Good unattended
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -29,3 +29,6 @@ manifests/*.json
|
|||||||
plugin.hwm
|
plugin.hwm
|
||||||
plugin.pwd
|
plugin.pwd
|
||||||
plugin.pwi
|
plugin.pwi
|
||||||
|
|
||||||
|
crash.log
|
||||||
|
tmp/
|
||||||
|
|||||||
@@ -1,220 +1,690 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||||
<settings pass="windowsPE">
|
<!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=fr-FR&Locale=fr-FR&Keyboard=0000040c&UseKeyboard2=true&Locale2=en-US&Keyboard2=00000409&GeoLocation=84&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&ComputerNameMode=Random&CompactOsMode=Default&TimeZoneMode=Explicit&TimeZone=Romance+Standard+Time&PartitionMode=Unattended&PartitionLayout=GPT&EspSize=300&RecoveryMode=None&DiskAssertionMode=Skip&WindowsEditionMode=Generic&WindowsEdition=pro&InstallFromMode=Automatic&PEMode=Default&UserAccountMode=Unattended&AccountName0=Admin&AccountDisplayName0=&AccountPassword0=&AccountGroup0=Administrators&AccountName1=Installer&AccountDisplayName1=Installer&AccountPassword1=Stid_2026-03&AccountGroup1=Users&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&ShowFileExtensions=true&ClassicContextMenu=true&TaskbarSearch=Box&TaskbarIconsMode=Default&DisableWidgets=true&StartTilesMode=Default&StartPinsMode=Empty&DisableDefender=true&DisableUac=true&DisableSystemRestore=true&EnableRemoteDesktop=true&AllowPowerShellScripts=true&TurnOffSystemSounds=true&DisableAppSuggestions=true&PreventDeviceEncryption=true&HideEdgeFre=true&DisableEdgeStartupBoost=true&EffectsMode=Performance&DesktopIconsMode=Default&StartFoldersMode=Default&VirtIoGuestTools=true&WifiMode=Skip&ExpressSettings=DisableAll&LockKeysMode=Skip&StickyKeysMode=Default&ColorMode=Default&WallpaperMode=Default&LockScreenMode=Default&Remove3DViewer=true&RemoveBingSearch=true&RemoveCalculator=true&RemoveCamera=true&RemoveClipchamp=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveWindowsHello=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGameAssist=true&RemoveGetHelp=true&RemoveHandwriting=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveMediaFeatures=true&RemoveStore=true&RemoveMixedReality=true&RemoveZuneVideo=true&RemoveNews=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOneSync=true&RemoveOpenSSHClient=true&RemoveOutlook=true&RemovePaint=true&RemovePaint3D=true&RemovePeople=true&RemovePhotos=true&RemovePowerAutomate=true&RemoveQuickAssist=true&RemoveRecall=true&RemoveRdpClient=true&RemoveSkype=true&RemoveSnippingTool=true&RemoveSolitaire=true&RemoveSpeech=true&RemoveStepsRecorder=true&RemoveStickyNotes=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWallet=true&RemoveWeather=true&RemoveFaxAndScan=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveWordPad=true&RemoveXboxApps=true&RemoveYourPhone=true&WdacMode=Skip&AppLockerMode=Skip-->
|
||||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<settings pass="offlineServicing"></settings>
|
||||||
<SetupUILanguage>
|
<settings pass="windowsPE">
|
||||||
<UILanguage>${vm_inst_os_language}</UILanguage>
|
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
</SetupUILanguage>
|
<UILanguage>fr-FR</UILanguage>
|
||||||
<InputLocale>${vm_inst_os_keyboard}</InputLocale>
|
</component>
|
||||||
<SystemLocale>${vm_inst_os_language}</SystemLocale>
|
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
<UILanguage>${vm_inst_os_language}</UILanguage>
|
<ImageInstall>
|
||||||
<UILanguageFallback>${vm_inst_os_language}</UILanguageFallback>
|
<OSImage>
|
||||||
<UserLocale>${vm_inst_os_language}</UserLocale>
|
<InstallTo>
|
||||||
</component>
|
<DiskID>0</DiskID>
|
||||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<PartitionID>3</PartitionID>
|
||||||
<DriverPaths>
|
</InstallTo>
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="3">
|
</OSImage>
|
||||||
<Path>F:\viostor\w11\amd64\</Path>
|
</ImageInstall>
|
||||||
</PathAndCredentials>
|
<UserData>
|
||||||
<PathAndCredentials wcm:action="add" wcm:keyValue="4">
|
<ProductKey>
|
||||||
<Path>F:\NetKVM\w11\amd64\</Path>
|
<Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key>
|
||||||
</PathAndCredentials>
|
<WillShowUI>OnError</WillShowUI>
|
||||||
</DriverPaths>
|
</ProductKey>
|
||||||
</component>
|
<AcceptEula>true</AcceptEula>
|
||||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
</UserData>
|
||||||
<DiskConfiguration>
|
<UseConfigurationSet>false</UseConfigurationSet>
|
||||||
<Disk wcm:action="add">
|
<RunSynchronous>
|
||||||
<DiskID>0</DiskID>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<WillWipeDisk>true</WillWipeDisk>
|
<Order>1</Order>
|
||||||
<CreatePartitions>
|
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path>
|
||||||
<!-- Windows RE Tools partition -->
|
</RunSynchronousCommand>
|
||||||
<CreatePartition wcm:action="add">
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<Order>1</Order>
|
<Order>2</Order>
|
||||||
<Type>Primary</Type>
|
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path>
|
||||||
<Size>550</Size>
|
</RunSynchronousCommand>
|
||||||
</CreatePartition>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<!-- System partition (ESP) -->
|
<Order>3</Order>
|
||||||
<CreatePartition wcm:action="add">
|
<Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path>
|
||||||
<Order>2</Order>
|
</RunSynchronousCommand>
|
||||||
<Type>EFI</Type>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<Size>100</Size>
|
<Order>4</Order>
|
||||||
</CreatePartition>
|
<Path>cmd.exe /c >>X:\diskpart.txt (echo:SELECT DISK=0&echo:CLEAN&echo:CONVERT GPT&echo:CREATE PARTITION EFI SIZE=300&echo:FORMAT QUICK FS=FAT32 LABEL=^"System^"&echo:ASSIGN LETTER=S&echo:CREATE PARTITION MSR SIZE=16&echo:CREATE PARTITION PRIMARY)</Path>
|
||||||
<!-- Microsoft reserved partition (MSR) -->
|
</RunSynchronousCommand>
|
||||||
<CreatePartition wcm:action="add">
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<Order>3</Order>
|
<Order>5</Order>
|
||||||
<Type>MSR</Type>
|
<Path>cmd.exe /c >>X:\diskpart.txt (echo:FORMAT QUICK FS=NTFS LABEL=^"Windows^"&echo:ASSIGN LETTER=W)</Path>
|
||||||
<Size>128</Size>
|
</RunSynchronousCommand>
|
||||||
</CreatePartition>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<!-- Windows partition -->
|
<Order>6</Order>
|
||||||
<CreatePartition wcm:action="add">
|
<Path>cmd.exe /c "diskpart.exe /s "X:\diskpart.txt" >>"X:\diskpart.log" || ( type "X:\diskpart.log" & echo diskpart encountered an error. & pause & exit /b 1 )"</Path>
|
||||||
<Order>4</Order>
|
</RunSynchronousCommand>
|
||||||
<Type>Primary</Type>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<Extend>true</Extend>
|
<Order>7</Order>
|
||||||
</CreatePartition>
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:WScript.Echo ^"Scanning for newly created SYSTEM registry hive file to disable Windows Defender services...^"&echo:Set fso = CreateObject(^"Scripting.FileSystemObject^"^))</Path>
|
||||||
</CreatePartitions>
|
</RunSynchronousCommand>
|
||||||
<ModifyPartitions>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<!-- Windows RE Tools partition -->
|
<Order>8</Order>
|
||||||
<ModifyPartition wcm:action="add">
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:Set existing = CreateObject(^"Scripting.Dictionary^"^)&echo:Function Execute(command^)&echo:WScript.Echo ^"Running command '^" + command + ^"'^"&echo:Set shell = CreateObject(^"WScript.Shell^"^))</Path>
|
||||||
<Order>1</Order>
|
</RunSynchronousCommand>
|
||||||
<PartitionID>1</PartitionID>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<Label>WINRE</Label>
|
<Order>9</Order>
|
||||||
<Format>NTFS</Format>
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:Set exec = shell.Exec(command^)&echo:Do While exec.Status = 0&echo:WScript.Sleep 100&echo:Loop&echo:WScript.Echo exec.StdOut.ReadAll&echo:WScript.Echo exec.StdErr.ReadAll&echo:Execute = exec.ExitCode&echo:End Function)</Path>
|
||||||
<TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
|
</RunSynchronousCommand>
|
||||||
</ModifyPartition>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<!-- System partition (ESP) -->
|
<Order>10</Order>
|
||||||
<ModifyPartition wcm:action="add">
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:Function FindHiveFiles&echo:Set FindHiveFiles = CreateObject(^"Scripting.Dictionary^"^)&echo:For Each drive In fso.Drives&echo:If drive.IsReady And drive.DriveLetter ^<^> ^"X^" Then)</Path>
|
||||||
<Order>2</Order>
|
</RunSynchronousCommand>
|
||||||
<PartitionID>2</PartitionID>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<Label>System</Label>
|
<Order>11</Order>
|
||||||
<Format>FAT32</Format>
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:For Each folder In Array(^"$Windows.~BT\NewOS\Windows^", ^"Windows^"^)&echo:file = fso.BuildPath(fso.BuildPath(drive.RootFolder, folder^), ^"System32\config\SYSTEM^"^))</Path>
|
||||||
</ModifyPartition>
|
</RunSynchronousCommand>
|
||||||
<!-- MSR partition does not need to be modified -->
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<ModifyPartition wcm:action="add">
|
<Order>12</Order>
|
||||||
<Order>3</Order>
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:If fso.FileExists(file^) And fso.FileExists(file + ^".LOG1^"^) And fso.FileExists(file + ^".LOG2^"^) Then&echo:FindHiveFiles.Add file, Nothing&echo:End If&echo:Next&echo:End If&echo:Next&echo:End Function)</Path>
|
||||||
<PartitionID>3</PartitionID>
|
</RunSynchronousCommand>
|
||||||
</ModifyPartition>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<!-- Windows partition -->
|
<Order>13</Order>
|
||||||
<ModifyPartition wcm:action="add">
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:For Each file In FindHiveFiles&echo:WScript.Echo ^"Will ignore file at '^" + file + ^"' because it was already present when Windows Setup started.^"&echo:existing.Add file, Nothing&echo:Next&echo:Do)</Path>
|
||||||
<Order>4</Order>
|
</RunSynchronousCommand>
|
||||||
<PartitionID>4</PartitionID>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<Label>OS</Label>
|
<Order>14</Order>
|
||||||
<Letter>C</Letter>
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:For Each file In FindHiveFiles&echo:If Not existing.Exists(file^) Then&echo:ret = 1&echo:While ret ^> 0&echo:WScript.Sleep 500&echo:ret = Execute(^"reg.exe LOAD HKLM\mount ^" + file^)&echo:Wend)</Path>
|
||||||
<Format>NTFS</Format>
|
</RunSynchronousCommand>
|
||||||
</ModifyPartition>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
</ModifyPartitions>
|
<Order>15</Order>
|
||||||
</Disk>
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:For Each service In Array(^"Sense^", ^"WdBoot^", ^"WdFilter^", ^"WdNisDrv^", ^"WdNisSvc^", ^"WinDefend^"^))</Path>
|
||||||
</DiskConfiguration>
|
</RunSynchronousCommand>
|
||||||
<ImageInstall>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<OSImage>
|
<Order>16</Order>
|
||||||
<InstallFrom>
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:ret = Execute(^"reg.exe ADD HKLM\mount\ControlSet001\Services\^" + service + ^" /v Start /t REG_DWORD /d 4 /f^"^)&echo:Next&echo:ret = Execute(^"reg.exe UNLOAD HKLM\mount^"^))</Path>
|
||||||
<MetaData wcm:action="add">
|
</RunSynchronousCommand>
|
||||||
<Key>/IMAGE/NAME</Key>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<Value>${vm_inst_os_image}</Value>
|
<Order>17</Order>
|
||||||
</MetaData>
|
<Path>cmd.exe /c >>X:\defender.vbs (echo:WScript.Echo ^"Found and successfully modified SYSTEM registry hive file at '^" + file + ^"'. This window will now close.^"&echo:WScript.Sleep 5000&echo:Exit Do&echo:End If&echo:WScript.Sleep 1000&echo:Next&echo:Loop)</Path>
|
||||||
</InstallFrom>
|
</RunSynchronousCommand>
|
||||||
<InstallTo>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<DiskID>0</DiskID>
|
<Order>18</Order>
|
||||||
<PartitionID>4</PartitionID>
|
<Path>cmd.exe /c "start /MIN cscript.exe //E:vbscript X:\defender.vbs"</Path>
|
||||||
</InstallTo>
|
</RunSynchronousCommand>
|
||||||
</OSImage>
|
</RunSynchronous>
|
||||||
</ImageInstall>
|
</component>
|
||||||
<RunSynchronous>
|
</settings>
|
||||||
<RunSynchronousCommand>
|
<settings pass="generalize"></settings>
|
||||||
<Order>1</Order>
|
<settings pass="specialize">
|
||||||
<!-- Set power scheme to high performance in WinPE for faster imaging. -->
|
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
<Path>cmd /c powercfg.exe /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c</Path>
|
<RunSynchronous>
|
||||||
</RunSynchronousCommand>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
</RunSynchronous>
|
<Order>1</Order>
|
||||||
<UserData>
|
<Path>powershell.exe -WindowStyle "Normal" -NoProfile -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;"</Path>
|
||||||
<AcceptEula>true</AcceptEula>
|
</RunSynchronousCommand>
|
||||||
<FullName>${build_username}</FullName>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<Organization>${build_username}</Organization>
|
<Order>2</Order>
|
||||||
%{if vm_inst_os_eval != true ~}
|
<Path>powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\Specialize.ps1"</Path>
|
||||||
<ProductKey>
|
</RunSynchronousCommand>
|
||||||
<Key>${vm_inst_os_key}</Key>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<WillShowUI>OnError</WillShowUI>
|
<Order>3</Order>
|
||||||
</ProductKey>
|
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
||||||
%{ endif ~}
|
</RunSynchronousCommand>
|
||||||
</UserData>
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<EnableFirewall>false</EnableFirewall>
|
<Order>4</Order>
|
||||||
</component>
|
<Path>powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\DefaultUser.ps1"</Path>
|
||||||
</settings>
|
</RunSynchronousCommand>
|
||||||
<settings pass="offlineServicing">
|
<RunSynchronousCommand wcm:action="add">
|
||||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<Order>5</Order>
|
||||||
<EnableLUA>false</EnableLUA>
|
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
||||||
</component>
|
</RunSynchronousCommand>
|
||||||
</settings>
|
</RunSynchronous>
|
||||||
<settings pass="generalize">
|
</component>
|
||||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
<SkipRearm>1</SkipRearm>
|
<TimeZone>Romance Standard Time</TimeZone>
|
||||||
</component>
|
</component>
|
||||||
</settings>
|
</settings>
|
||||||
<settings pass="specialize">
|
<settings pass="auditSystem"></settings>
|
||||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<settings pass="auditUser"></settings>
|
||||||
<OEMInformation>
|
<settings pass="oobeSystem">
|
||||||
<HelpCustomized>false</HelpCustomized>
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
</OEMInformation>
|
<InputLocale>040c:0000040c;0409:00000409</InputLocale>
|
||||||
<TimeZone>${vm_guest_os_timezone}</TimeZone>
|
<SystemLocale>fr-FR</SystemLocale>
|
||||||
<RegisteredOwner />
|
<UILanguage>fr-FR</UILanguage>
|
||||||
</component>
|
<UserLocale>fr-FR</UserLocale>
|
||||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
</component>
|
||||||
<DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
|
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
</component>
|
<UserAccounts>
|
||||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<LocalAccounts>
|
||||||
<DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
|
<LocalAccount wcm:action="add">
|
||||||
</component>
|
<Name>Admin</Name>
|
||||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<DisplayName></DisplayName>
|
||||||
<SkipAutoActivation>true</SkipAutoActivation>
|
<Group>Administrators</Group>
|
||||||
</component>
|
<Password>
|
||||||
</settings>
|
<Value></Value>
|
||||||
<settings pass="oobeSystem">
|
<PlainText>true</PlainText>
|
||||||
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
</Password>
|
||||||
<InputLocale>${vm_guest_os_keyboard}</InputLocale>
|
</LocalAccount>
|
||||||
<SystemLocale>${vm_guest_os_language}</SystemLocale>
|
<LocalAccount wcm:action="add">
|
||||||
<UILanguage>${vm_guest_os_language}</UILanguage>
|
<Name>Installer</Name>
|
||||||
<UILanguageFallback>${vm_guest_os_language}</UILanguageFallback>
|
<DisplayName>Installer</DisplayName>
|
||||||
<UserLocale>${vm_guest_os_language}</UserLocale>
|
<Group>Users</Group>
|
||||||
</component>
|
<Password>
|
||||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
<Value>Stid_2026-03</Value>
|
||||||
<AutoLogon>
|
<PlainText>true</PlainText>
|
||||||
<Password>
|
</Password>
|
||||||
<Value>${build_password}</Value>
|
</LocalAccount>
|
||||||
<PlainText>true</PlainText>
|
</LocalAccounts>
|
||||||
</Password>
|
</UserAccounts>
|
||||||
<Enabled>true</Enabled>
|
<AutoLogon>
|
||||||
<Username>${build_username}</Username>
|
<Username>Admin</Username>
|
||||||
</AutoLogon>
|
<Enabled>true</Enabled>
|
||||||
<OOBE>
|
<LogonCount>1</LogonCount>
|
||||||
<HideEULAPage>true</HideEULAPage>
|
<Password>
|
||||||
<HideLocalAccountScreen>true</HideLocalAccountScreen>
|
<Value></Value>
|
||||||
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
<PlainText>true</PlainText>
|
||||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
</Password>
|
||||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
</AutoLogon>
|
||||||
<NetworkLocation>Work</NetworkLocation>
|
<OOBE>
|
||||||
<ProtectYourPC>2</ProtectYourPC>
|
<ProtectYourPC>3</ProtectYourPC>
|
||||||
</OOBE>
|
<HideEULAPage>true</HideEULAPage>
|
||||||
<UserAccounts>
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
<AdministratorPassword>
|
<HideOnlineAccountScreens>false</HideOnlineAccountScreens>
|
||||||
<Value>${build_password}</Value>
|
</OOBE>
|
||||||
<PlainText>true</PlainText>
|
<FirstLogonCommands>
|
||||||
</AdministratorPassword>
|
<SynchronousCommand wcm:action="add">
|
||||||
<LocalAccounts>
|
<Order>1</Order>
|
||||||
<LocalAccount wcm:action="add">
|
<CommandLine>powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\FirstLogon.ps1"</CommandLine>
|
||||||
<Password>
|
</SynchronousCommand>
|
||||||
<Value>${build_password}</Value>
|
</FirstLogonCommands>
|
||||||
<PlainText>true</PlainText>
|
</component>
|
||||||
</Password>
|
</settings>
|
||||||
<Group>administrators</Group>
|
<Extensions xmlns="https://schneegans.de/windows/unattend-generator/">
|
||||||
<DisplayName>${build_username}</DisplayName>
|
<Build>
|
||||||
<Name>${build_username}</Name>
|
<Commit>
|
||||||
<Description>Build Account</Description>
|
<Hash>b5944ad0b8d26588e78d963562e0f80ee2e33aeb</Hash>
|
||||||
</LocalAccount>
|
<GitHubUrl>https://github.com/cschneegans/unattend-generator/commit/b5944ad0b8d26588e78d963562e0f80ee2e33aeb</GitHubUrl>
|
||||||
</LocalAccounts>
|
</Commit>
|
||||||
</UserAccounts>
|
</Build>
|
||||||
<FirstLogonCommands>
|
<ExtractScript>
|
||||||
<SynchronousCommand wcm:action="add">
|
param(
|
||||||
<CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
[xml] $Document
|
||||||
<Description>Set Execution Policy 64-Bit</Description>
|
);
|
||||||
<Order>1</Order>
|
|
||||||
<RequiresUserInput>true</RequiresUserInput>
|
foreach( $file in $Document.unattend.Extensions.File ) {
|
||||||
</SynchronousCommand>
|
$path = [System.Environment]::ExpandEnvironmentVariables( $file.GetAttribute( 'path' ) );
|
||||||
<SynchronousCommand wcm:action="add">
|
mkdir -Path( $path | Split-Path -Parent ) -ErrorAction 'SilentlyContinue';
|
||||||
<CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
$encoding = switch( [System.IO.Path]::GetExtension( $path ) ) {
|
||||||
<Description>Set Execution Policy 32-Bit</Description>
|
{ $_ -in '.ps1', '.xml' } { [System.Text.Encoding]::UTF8; }
|
||||||
<Order>2</Order>
|
{ $_ -in '.reg', '.vbs', '.js' } { [System.Text.UnicodeEncoding]::new( $false, $true ); }
|
||||||
<RequiresUserInput>true</RequiresUserInput>
|
default { [System.Text.Encoding]::Default; }
|
||||||
</SynchronousCommand>
|
};
|
||||||
<SynchronousCommand wcm:action="add">
|
$bytes = $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() );
|
||||||
<CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -File E:\windows-virtio.ps1</CommandLine>
|
[System.IO.File]::WriteAllBytes( $path, $bytes );
|
||||||
<Order>3</Order>
|
}
|
||||||
<Description>Install VMware Tools</Description>
|
</ExtractScript>
|
||||||
</SynchronousCommand>
|
<File path="C:\Windows\Setup\Scripts\RemovePackages.ps1">
|
||||||
<SynchronousCommand wcm:action="add">
|
$selectors = @(
|
||||||
<CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -File E:\windows-init.ps1</CommandLine>
|
'Microsoft.Microsoft3DViewer';
|
||||||
<Order>4</Order>
|
'Microsoft.BingSearch';
|
||||||
<Description>Initial Configuration</Description>
|
'Microsoft.WindowsCalculator';
|
||||||
</SynchronousCommand>
|
'Microsoft.WindowsCamera';
|
||||||
</FirstLogonCommands>
|
'Clipchamp.Clipchamp';
|
||||||
</component>
|
'Microsoft.Copilot';
|
||||||
</settings>
|
'Microsoft.549981C3F5F10';
|
||||||
|
'Microsoft.Windows.DevHome';
|
||||||
|
'MicrosoftCorporationII.MicrosoftFamily';
|
||||||
|
'Microsoft.WindowsFeedbackHub';
|
||||||
|
'Microsoft.Edge.GameAssist';
|
||||||
|
'Microsoft.GetHelp';
|
||||||
|
'Microsoft.Getstarted';
|
||||||
|
'microsoft.windowscommunicationsapps';
|
||||||
|
'Microsoft.WindowsMaps';
|
||||||
|
'Microsoft.MixedReality.Portal';
|
||||||
|
'Microsoft.BingNews';
|
||||||
|
'Microsoft.MicrosoftOfficeHub';
|
||||||
|
'Microsoft.Office.OneNote';
|
||||||
|
'Microsoft.OutlookForWindows';
|
||||||
|
'Microsoft.Paint';
|
||||||
|
'Microsoft.MSPaint';
|
||||||
|
'Microsoft.People';
|
||||||
|
'Microsoft.Windows.Photos';
|
||||||
|
'Microsoft.PowerAutomateDesktop';
|
||||||
|
'MicrosoftCorporationII.QuickAssist';
|
||||||
|
'Microsoft.SkypeApp';
|
||||||
|
'Microsoft.ScreenSketch';
|
||||||
|
'Microsoft.MicrosoftSolitaireCollection';
|
||||||
|
'Microsoft.MicrosoftStickyNotes';
|
||||||
|
'Microsoft.WindowsStore';
|
||||||
|
'Microsoft.StorePurchaseApp';
|
||||||
|
'MicrosoftTeams';
|
||||||
|
'MSTeams';
|
||||||
|
'Microsoft.Todos';
|
||||||
|
'Microsoft.WindowsSoundRecorder';
|
||||||
|
'Microsoft.Wallet';
|
||||||
|
'Microsoft.BingWeather';
|
||||||
|
'Microsoft.Xbox.TCUI';
|
||||||
|
'Microsoft.XboxApp';
|
||||||
|
'Microsoft.XboxGameOverlay';
|
||||||
|
'Microsoft.XboxGamingOverlay';
|
||||||
|
'Microsoft.XboxIdentityProvider';
|
||||||
|
'Microsoft.XboxSpeechToTextOverlay';
|
||||||
|
'Microsoft.GamingApp';
|
||||||
|
'Microsoft.YourPhone';
|
||||||
|
'Microsoft.ZuneMusic';
|
||||||
|
'Microsoft.ZuneVideo';
|
||||||
|
);
|
||||||
|
$getCommand = {
|
||||||
|
Get-AppxProvisionedPackage -Online;
|
||||||
|
};
|
||||||
|
$filterCommand = {
|
||||||
|
$_.DisplayName -eq $selector;
|
||||||
|
};
|
||||||
|
$removeCommand = {
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter( Mandatory, ValueFromPipeline )]
|
||||||
|
$InputObject
|
||||||
|
);
|
||||||
|
process {
|
||||||
|
$InputObject | Remove-AppxProvisionedPackage -AllUsers -Online -ErrorAction 'Continue';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$type = 'Package';
|
||||||
|
$logfile = 'C:\Windows\Setup\Scripts\RemovePackages.log';
|
||||||
|
& {
|
||||||
|
$installed = & $getCommand;
|
||||||
|
foreach( $selector in $selectors ) {
|
||||||
|
$result = [ordered] @{
|
||||||
|
Selector = $selector;
|
||||||
|
};
|
||||||
|
$found = $installed | Where-Object -FilterScript $filterCommand;
|
||||||
|
if( $found ) {
|
||||||
|
$result.Output = $found | & $removeCommand;
|
||||||
|
if( $? ) {
|
||||||
|
$result.Message = "$type removed.";
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not removed.";
|
||||||
|
$result.Error = $Error[0];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not installed.";
|
||||||
|
}
|
||||||
|
$result | ConvertTo-Json -Depth 3 -Compress;
|
||||||
|
}
|
||||||
|
} *>&1 | Out-String -Width 1KB -Stream >> $logfile;
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Setup\Scripts\RemoveCapabilities.ps1">
|
||||||
|
$selectors = @(
|
||||||
|
'Print.Fax.Scan';
|
||||||
|
'Language.Handwriting';
|
||||||
|
'Browser.InternetExplorer';
|
||||||
|
'MathRecognizer';
|
||||||
|
'OneCoreUAP.OneSync';
|
||||||
|
'OpenSSH.Client';
|
||||||
|
'Microsoft.Windows.MSPaint';
|
||||||
|
'App.Support.QuickAssist';
|
||||||
|
'Microsoft.Windows.SnippingTool';
|
||||||
|
'Language.Speech';
|
||||||
|
'Language.TextToSpeech';
|
||||||
|
'App.StepsRecorder';
|
||||||
|
'Hello.Face.18967';
|
||||||
|
'Hello.Face.Migration.18967';
|
||||||
|
'Hello.Face.20134';
|
||||||
|
'Media.WindowsMediaPlayer';
|
||||||
|
'Microsoft.Windows.WordPad';
|
||||||
|
);
|
||||||
|
$getCommand = {
|
||||||
|
Get-WindowsCapability -Online | Where-Object -Property 'State' -NotIn -Value @(
|
||||||
|
'NotPresent';
|
||||||
|
'Removed';
|
||||||
|
);
|
||||||
|
};
|
||||||
|
$filterCommand = {
|
||||||
|
($_.Name -split '~')[0] -eq $selector;
|
||||||
|
};
|
||||||
|
$removeCommand = {
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter( Mandatory, ValueFromPipeline )]
|
||||||
|
$InputObject
|
||||||
|
);
|
||||||
|
process {
|
||||||
|
$InputObject | Remove-WindowsCapability -Online -ErrorAction 'Continue';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$type = 'Capability';
|
||||||
|
$logfile = 'C:\Windows\Setup\Scripts\RemoveCapabilities.log';
|
||||||
|
& {
|
||||||
|
$installed = & $getCommand;
|
||||||
|
foreach( $selector in $selectors ) {
|
||||||
|
$result = [ordered] @{
|
||||||
|
Selector = $selector;
|
||||||
|
};
|
||||||
|
$found = $installed | Where-Object -FilterScript $filterCommand;
|
||||||
|
if( $found ) {
|
||||||
|
$result.Output = $found | & $removeCommand;
|
||||||
|
if( $? ) {
|
||||||
|
$result.Message = "$type removed.";
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not removed.";
|
||||||
|
$result.Error = $Error[0];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not installed.";
|
||||||
|
}
|
||||||
|
$result | ConvertTo-Json -Depth 3 -Compress;
|
||||||
|
}
|
||||||
|
} *>&1 | Out-String -Width 1KB -Stream >> $logfile;
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Setup\Scripts\RemoveFeatures.ps1">
|
||||||
|
$selectors = @(
|
||||||
|
'MediaPlayback';
|
||||||
|
'Microsoft-RemoteDesktopConnection';
|
||||||
|
'Recall';
|
||||||
|
'Microsoft-SnippingTool';
|
||||||
|
);
|
||||||
|
$getCommand = {
|
||||||
|
Get-WindowsOptionalFeature -Online | Where-Object -Property 'State' -NotIn -Value @(
|
||||||
|
'Disabled';
|
||||||
|
'DisabledWithPayloadRemoved';
|
||||||
|
);
|
||||||
|
};
|
||||||
|
$filterCommand = {
|
||||||
|
$_.FeatureName -eq $selector;
|
||||||
|
};
|
||||||
|
$removeCommand = {
|
||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[Parameter( Mandatory, ValueFromPipeline )]
|
||||||
|
$InputObject
|
||||||
|
);
|
||||||
|
process {
|
||||||
|
$InputObject | Disable-WindowsOptionalFeature -Online -Remove -NoRestart -ErrorAction 'Continue';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$type = 'Feature';
|
||||||
|
$logfile = 'C:\Windows\Setup\Scripts\RemoveFeatures.log';
|
||||||
|
& {
|
||||||
|
$installed = & $getCommand;
|
||||||
|
foreach( $selector in $selectors ) {
|
||||||
|
$result = [ordered] @{
|
||||||
|
Selector = $selector;
|
||||||
|
};
|
||||||
|
$found = $installed | Where-Object -FilterScript $filterCommand;
|
||||||
|
if( $found ) {
|
||||||
|
$result.Output = $found | & $removeCommand;
|
||||||
|
if( $? ) {
|
||||||
|
$result.Message = "$type removed.";
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not removed.";
|
||||||
|
$result.Error = $Error[0];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$result.Message = "$type not installed.";
|
||||||
|
}
|
||||||
|
$result | ConvertTo-Json -Depth 3 -Compress;
|
||||||
|
}
|
||||||
|
} *>&1 | Out-String -Width 1KB -Stream >> $logfile;
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Setup\Scripts\TurnOffSystemSounds.ps1">
|
||||||
|
$excludes = Get-ChildItem -LiteralPath 'Registry::HKU\DefaultUser\AppEvents\EventLabels' |
|
||||||
|
Where-Object -FilterScript { ($_ | Get-ItemProperty).ExcludeFromCPL -eq 1; } |
|
||||||
|
Select-Object -ExpandProperty 'PSChildName';
|
||||||
|
Get-ChildItem -Path 'Registry::HKU\DefaultUser\AppEvents\Schemes\Apps\*\*' |
|
||||||
|
Where-Object -Property 'PSChildName' -NotIn $excludes |
|
||||||
|
Get-ChildItem -Include '.Current' | Set-ItemProperty -Name '(Default)' -Value '';
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Setup\Scripts\VirtIoGuestTools.ps1">
|
||||||
|
& {
|
||||||
|
foreach( $letter in 'DEFGHIJKLMNOPQRSTUVWXYZ'.ToCharArray() ) {
|
||||||
|
$exe = "${letter}:\virtio-win-guest-tools.exe";
|
||||||
|
if( Test-Path -LiteralPath $exe ) {
|
||||||
|
Start-Process -FilePath $exe -ArgumentList '/passive', '/norestart' -Wait;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'VirtIO Guest Tools image (virtio-win-*.iso) is not attached to this VM.';
|
||||||
|
} *>&1 | Out-String -Width 1KB -Stream >> 'C:\Windows\Setup\Scripts\VirtIoGuestTools.log';
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Setup\Scripts\SetStartPins.ps1">
|
||||||
|
$json = '{"pinnedList":[]}';
|
||||||
|
if( [System.Environment]::OSVersion.Version.Build -lt 20000 ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$key = 'Registry::HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start';
|
||||||
|
New-Item -Path $key -ItemType 'Directory' -ErrorAction 'SilentlyContinue';
|
||||||
|
Set-ItemProperty -LiteralPath $key -Name 'ConfigureStartPins' -Value $json -Type 'String';
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Setup\Scripts\Specialize.ps1">
|
||||||
|
$scripts = @(
|
||||||
|
{
|
||||||
|
reg.exe add "HKLM\SYSTEM\Setup\MoSetup" /v AllowUpgradesWithUnsupportedTPMOrCPU /t REG_DWORD /d 1 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
ReAgentc.exe /disable;
|
||||||
|
Remove-Item -LiteralPath 'C:\Windows\System32\Recovery\Winre.wim' -Force -ErrorAction 'SilentlyContinue';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Remove-Item -LiteralPath 'Registry::HKLM\Software\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate' -Force -ErrorAction 'SilentlyContinue';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Remove-Item -LiteralPath 'C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk', 'C:\Windows\System32\OneDriveSetup.exe', 'C:\Windows\SysWOW64\OneDriveSetup.exe' -ErrorAction 'Continue';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Remove-Item -LiteralPath 'Registry::HKLM\Software\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate' -Force -ErrorAction 'SilentlyContinue';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
& 'C:\Windows\Setup\Scripts\RemovePackages.ps1';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
& 'C:\Windows\Setup\Scripts\RemoveCapabilities.ps1';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
& 'C:\Windows\Setup\Scripts\RemoveFeatures.ps1';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
net.exe accounts /maxpwage:UNLIMITED;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Notifications" /v DisableNotifications /t REG_DWORD /d 1 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f
|
||||||
|
};
|
||||||
|
{
|
||||||
|
netsh.exe advfirewall firewall set rule group="@FirewallAPI.dll,-28752" new enable=Yes;
|
||||||
|
reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Set-ExecutionPolicy -Scope 'LocalMachine' -ExecutionPolicy 'RemoteSigned' -Force;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" /v DisableStartupSound /t REG_DWORD /d 1 /f;
|
||||||
|
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\EditionOverrides" /v UserSetting_DisableStartupSound /t REG_DWORD /d 1 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 1 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKLM\Software\Policies\Microsoft\Edge" /v HideFirstRunExperience /t REG_DWORD /d 1 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKLM\Software\Policies\Microsoft\Edge\Recommended" /v BackgroundModeEnabled /t REG_DWORD /d 0 /f;
|
||||||
|
reg.exe add "HKLM\Software\Policies\Microsoft\Edge\Recommended" /v StartupBoostEnabled /t REG_DWORD /d 0 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
& 'C:\Windows\Setup\Scripts\SetStartPins.ps1';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ControlAnimations" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\AnimateMinMax" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\TaskbarAnimations" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DWMAeroPeekEnabled" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\MenuAnimation" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\TooltipAnimation" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\SelectionFade" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DWMSaveThumbnailEnabled" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\CursorShadow" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ListviewShadow" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ThumbnailsOrIcon" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ListviewAlphaSelect" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DragFullWindows" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ComboBoxAnimation" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\FontSmoothing" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ListBoxSmoothScrolling" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
Set-ItemProperty -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DropShadow" -Name 'DefaultValue' -Value 0 -Type 'DWord' -Force;
|
||||||
|
};
|
||||||
|
);
|
||||||
|
|
||||||
|
& {
|
||||||
|
[float] $complete = 0;
|
||||||
|
[float] $increment = 100 / $scripts.Count;
|
||||||
|
foreach( $script in $scripts ) {
|
||||||
|
Write-Progress -Id 0 -Activity 'Running scripts to customize your Windows installation. Do not close this window.' -PercentComplete $complete;
|
||||||
|
'*** Will now execute command «{0}».' -f $(
|
||||||
|
$script.ToString().Trim() -replace '\s+', ' ' -replace '^(.{99})(.+)$', '$1…';
|
||||||
|
);
|
||||||
|
$start = [datetime]::Now;
|
||||||
|
& $script;
|
||||||
|
'*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds;
|
||||||
|
"`r`n" * 3;
|
||||||
|
$complete += $increment;
|
||||||
|
}
|
||||||
|
} *>&1 | Out-String -Width 1KB -Stream >> "C:\Windows\Setup\Scripts\Specialize.log";
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Setup\Scripts\UserOnce.ps1">
|
||||||
|
$scripts = @(
|
||||||
|
{
|
||||||
|
Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Set-ItemProperty -LiteralPath 'Registry::HKCU\AppEvents\Schemes' -Name '(Default)' -Type 'String' -Value '.None';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /ve /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Set-ItemProperty -LiteralPath 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects' -Name 'VisualFXSetting' -Type 'DWord' -Value 2 -Force;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Get-Process -Name 'explorer' -ErrorAction 'SilentlyContinue' | Where-Object -FilterScript {
|
||||||
|
$_.SessionId -eq ( Get-Process -Id $PID ).SessionId;
|
||||||
|
} | Stop-Process -Force;
|
||||||
|
};
|
||||||
|
);
|
||||||
|
|
||||||
|
& {
|
||||||
|
[float] $complete = 0;
|
||||||
|
[float] $increment = 100 / $scripts.Count;
|
||||||
|
foreach( $script in $scripts ) {
|
||||||
|
Write-Progress -Id 0 -Activity 'Running scripts to configure this user account. Do not close this window.' -PercentComplete $complete;
|
||||||
|
'*** Will now execute command «{0}».' -f $(
|
||||||
|
$script.ToString().Trim() -replace '\s+', ' ' -replace '^(.{99})(.+)$', '$1…';
|
||||||
|
);
|
||||||
|
$start = [datetime]::Now;
|
||||||
|
& $script;
|
||||||
|
'*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds;
|
||||||
|
"`r`n" * 3;
|
||||||
|
$complete += $increment;
|
||||||
|
}
|
||||||
|
} *>&1 | Out-String -Width 1KB -Stream >> "$env:TEMP\UserOnce.log";
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Setup\Scripts\DefaultUser.ps1">
|
||||||
|
$scripts = @(
|
||||||
|
{
|
||||||
|
reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKU\DefaultUser\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore" /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Remove-ItemProperty -LiteralPath 'Registry::HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Run' -Name 'OneDriveSetup' -Force -ErrorAction 'Continue';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\GameDVR" /v AppCaptureEnabled /t REG_DWORD /d 0 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
& 'C:\Windows\Setup\Scripts\TurnOffSystemSounds.ps1';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
$names = @(
|
||||||
|
'ContentDeliveryAllowed';
|
||||||
|
'FeatureManagementEnabled';
|
||||||
|
'OEMPreInstalledAppsEnabled';
|
||||||
|
'PreInstalledAppsEnabled';
|
||||||
|
'PreInstalledAppsEverEnabled';
|
||||||
|
'SilentInstalledAppsEnabled';
|
||||||
|
'SoftLandingEnabled';
|
||||||
|
'SubscribedContentEnabled';
|
||||||
|
'SubscribedContent-310093Enabled';
|
||||||
|
'SubscribedContent-338387Enabled';
|
||||||
|
'SubscribedContent-338388Enabled';
|
||||||
|
'SubscribedContent-338389Enabled';
|
||||||
|
'SubscribedContent-338393Enabled';
|
||||||
|
'SubscribedContent-353694Enabled';
|
||||||
|
'SubscribedContent-353696Enabled';
|
||||||
|
'SubscribedContent-353698Enabled';
|
||||||
|
'SystemPaneSuggestionsEnabled';
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach( $name in $names ) {
|
||||||
|
reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v $name /t REG_DWORD /d 0 /f;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
{
|
||||||
|
reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v "UnattendedSetup" /t REG_SZ /d "powershell.exe -WindowStyle \""Normal\"" -ExecutionPolicy \""Unrestricted\"" -NoProfile -File \""C:\Windows\Setup\Scripts\UserOnce.ps1\""" /f;
|
||||||
|
};
|
||||||
|
);
|
||||||
|
|
||||||
|
& {
|
||||||
|
[float] $complete = 0;
|
||||||
|
[float] $increment = 100 / $scripts.Count;
|
||||||
|
foreach( $script in $scripts ) {
|
||||||
|
Write-Progress -Id 0 -Activity 'Running scripts to modify the default user’’s registry hive. Do not close this window.' -PercentComplete $complete;
|
||||||
|
'*** Will now execute command «{0}».' -f $(
|
||||||
|
$script.ToString().Trim() -replace '\s+', ' ' -replace '^(.{99})(.+)$', '$1…';
|
||||||
|
);
|
||||||
|
$start = [datetime]::Now;
|
||||||
|
& $script;
|
||||||
|
'*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds;
|
||||||
|
"`r`n" * 3;
|
||||||
|
$complete += $increment;
|
||||||
|
}
|
||||||
|
} *>&1 | Out-String -Width 1KB -Stream >> "C:\Windows\Setup\Scripts\DefaultUser.log";
|
||||||
|
</File>
|
||||||
|
<File path="C:\Windows\Setup\Scripts\FirstLogon.ps1">
|
||||||
|
$scripts = @(
|
||||||
|
{
|
||||||
|
Set-ItemProperty -LiteralPath 'Registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name 'AutoLogonCount' -Type 'DWord' -Force -Value 0;
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Disable-ComputerRestore -Drive 'C:\';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
& 'C:\Windows\Setup\Scripts\VirtIoGuestTools.ps1';
|
||||||
|
};
|
||||||
|
{
|
||||||
|
Remove-Item -LiteralPath @(
|
||||||
|
'C:\Windows\Panther\unattend.xml';
|
||||||
|
'C:\Windows\Panther\unattend-original.xml';
|
||||||
|
'C:\Windows\Setup\Scripts\Wifi.xml';
|
||||||
|
) -Force -ErrorAction 'SilentlyContinue' -Verbose;
|
||||||
|
};
|
||||||
|
);
|
||||||
|
|
||||||
|
& {
|
||||||
|
[float] $complete = 0;
|
||||||
|
[float] $increment = 100 / $scripts.Count;
|
||||||
|
foreach( $script in $scripts ) {
|
||||||
|
Write-Progress -Id 0 -Activity 'Running scripts to finalize your Windows installation. Do not close this window.' -PercentComplete $complete;
|
||||||
|
'*** Will now execute command «{0}».' -f $(
|
||||||
|
$script.ToString().Trim() -replace '\s+', ' ' -replace '^(.{99})(.+)$', '$1…';
|
||||||
|
);
|
||||||
|
$start = [datetime]::Now;
|
||||||
|
& $script;
|
||||||
|
'*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds;
|
||||||
|
"`r`n" * 3;
|
||||||
|
$complete += $increment;
|
||||||
|
}
|
||||||
|
} *>&1 | Out-String -Width 1KB -Stream >> "C:\Windows\Setup\Scripts\FirstLogon.log";
|
||||||
|
</File>
|
||||||
|
</Extensions>
|
||||||
</unattend>
|
</unattend>
|
||||||
|
|||||||
220
builds/windows/desktop/11/data/autounattend.pkrtpl.hcl.old
Normal file
220
builds/windows/desktop/11/data/autounattend.pkrtpl.hcl.old
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||||
|
<settings pass="windowsPE">
|
||||||
|
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SetupUILanguage>
|
||||||
|
<UILanguage>${vm_inst_os_language}</UILanguage>
|
||||||
|
</SetupUILanguage>
|
||||||
|
<InputLocale>${vm_inst_os_keyboard}</InputLocale>
|
||||||
|
<SystemLocale>${vm_inst_os_language}</SystemLocale>
|
||||||
|
<UILanguage>${vm_inst_os_language}</UILanguage>
|
||||||
|
<UILanguageFallback>${vm_inst_os_language}</UILanguageFallback>
|
||||||
|
<UserLocale>${vm_inst_os_language}</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DriverPaths>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="3">
|
||||||
|
<Path>F:\viostor\w11\amd64\</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
<PathAndCredentials wcm:action="add" wcm:keyValue="4">
|
||||||
|
<Path>F:\NetKVM\w11\amd64\</Path>
|
||||||
|
</PathAndCredentials>
|
||||||
|
</DriverPaths>
|
||||||
|
</component>
|
||||||
|
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DiskConfiguration>
|
||||||
|
<Disk wcm:action="add">
|
||||||
|
<DiskID>0</DiskID>
|
||||||
|
<WillWipeDisk>true</WillWipeDisk>
|
||||||
|
<CreatePartitions>
|
||||||
|
<!-- Windows RE Tools partition -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<Type>Primary</Type>
|
||||||
|
<Size>550</Size>
|
||||||
|
</CreatePartition>
|
||||||
|
<!-- System partition (ESP) -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<Type>EFI</Type>
|
||||||
|
<Size>100</Size>
|
||||||
|
</CreatePartition>
|
||||||
|
<!-- Microsoft reserved partition (MSR) -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<Type>MSR</Type>
|
||||||
|
<Size>128</Size>
|
||||||
|
</CreatePartition>
|
||||||
|
<!-- Windows partition -->
|
||||||
|
<CreatePartition wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
|
<Type>Primary</Type>
|
||||||
|
<Extend>true</Extend>
|
||||||
|
</CreatePartition>
|
||||||
|
</CreatePartitions>
|
||||||
|
<ModifyPartitions>
|
||||||
|
<!-- Windows RE Tools partition -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>1</Order>
|
||||||
|
<PartitionID>1</PartitionID>
|
||||||
|
<Label>WINRE</Label>
|
||||||
|
<Format>NTFS</Format>
|
||||||
|
<TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
|
||||||
|
</ModifyPartition>
|
||||||
|
<!-- System partition (ESP) -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>2</Order>
|
||||||
|
<PartitionID>2</PartitionID>
|
||||||
|
<Label>System</Label>
|
||||||
|
<Format>FAT32</Format>
|
||||||
|
</ModifyPartition>
|
||||||
|
<!-- MSR partition does not need to be modified -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>3</Order>
|
||||||
|
<PartitionID>3</PartitionID>
|
||||||
|
</ModifyPartition>
|
||||||
|
<!-- Windows partition -->
|
||||||
|
<ModifyPartition wcm:action="add">
|
||||||
|
<Order>4</Order>
|
||||||
|
<PartitionID>4</PartitionID>
|
||||||
|
<Label>OS</Label>
|
||||||
|
<Letter>C</Letter>
|
||||||
|
<Format>NTFS</Format>
|
||||||
|
</ModifyPartition>
|
||||||
|
</ModifyPartitions>
|
||||||
|
</Disk>
|
||||||
|
</DiskConfiguration>
|
||||||
|
<ImageInstall>
|
||||||
|
<OSImage>
|
||||||
|
<InstallFrom>
|
||||||
|
<MetaData wcm:action="add">
|
||||||
|
<Key>/IMAGE/NAME</Key>
|
||||||
|
<Value>${vm_inst_os_image}</Value>
|
||||||
|
</MetaData>
|
||||||
|
</InstallFrom>
|
||||||
|
<InstallTo>
|
||||||
|
<DiskID>0</DiskID>
|
||||||
|
<PartitionID>4</PartitionID>
|
||||||
|
</InstallTo>
|
||||||
|
</OSImage>
|
||||||
|
</ImageInstall>
|
||||||
|
<RunSynchronous>
|
||||||
|
<RunSynchronousCommand>
|
||||||
|
<Order>1</Order>
|
||||||
|
<!-- Set power scheme to high performance in WinPE for faster imaging. -->
|
||||||
|
<Path>cmd /c powercfg.exe /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c</Path>
|
||||||
|
</RunSynchronousCommand>
|
||||||
|
</RunSynchronous>
|
||||||
|
<UserData>
|
||||||
|
<AcceptEula>true</AcceptEula>
|
||||||
|
<FullName>${build_username}</FullName>
|
||||||
|
<Organization>${build_username}</Organization>
|
||||||
|
%{if vm_inst_os_eval != true ~}
|
||||||
|
<ProductKey>
|
||||||
|
<Key>${vm_inst_os_key}</Key>
|
||||||
|
<WillShowUI>OnError</WillShowUI>
|
||||||
|
</ProductKey>
|
||||||
|
%{ endif ~}
|
||||||
|
</UserData>
|
||||||
|
<EnableFirewall>false</EnableFirewall>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="offlineServicing">
|
||||||
|
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<EnableLUA>false</EnableLUA>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="generalize">
|
||||||
|
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SkipRearm>1</SkipRearm>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="specialize">
|
||||||
|
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<OEMInformation>
|
||||||
|
<HelpCustomized>false</HelpCustomized>
|
||||||
|
</OEMInformation>
|
||||||
|
<TimeZone>${vm_guest_os_timezone}</TimeZone>
|
||||||
|
<RegisteredOwner />
|
||||||
|
</component>
|
||||||
|
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
|
||||||
|
</component>
|
||||||
|
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
|
||||||
|
</component>
|
||||||
|
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<SkipAutoActivation>true</SkipAutoActivation>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
<settings pass="oobeSystem">
|
||||||
|
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<InputLocale>${vm_guest_os_keyboard}</InputLocale>
|
||||||
|
<SystemLocale>${vm_guest_os_language}</SystemLocale>
|
||||||
|
<UILanguage>${vm_guest_os_language}</UILanguage>
|
||||||
|
<UILanguageFallback>${vm_guest_os_language}</UILanguageFallback>
|
||||||
|
<UserLocale>${vm_guest_os_language}</UserLocale>
|
||||||
|
</component>
|
||||||
|
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||||
|
<AutoLogon>
|
||||||
|
<Password>
|
||||||
|
<Value>${build_password}</Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
<Enabled>true</Enabled>
|
||||||
|
<Username>${build_username}</Username>
|
||||||
|
</AutoLogon>
|
||||||
|
<OOBE>
|
||||||
|
<HideEULAPage>true</HideEULAPage>
|
||||||
|
<HideLocalAccountScreen>true</HideLocalAccountScreen>
|
||||||
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
||||||
|
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||||
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||||
|
<NetworkLocation>Work</NetworkLocation>
|
||||||
|
<ProtectYourPC>2</ProtectYourPC>
|
||||||
|
</OOBE>
|
||||||
|
<UserAccounts>
|
||||||
|
<AdministratorPassword>
|
||||||
|
<Value>${build_password}</Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</AdministratorPassword>
|
||||||
|
<LocalAccounts>
|
||||||
|
<LocalAccount wcm:action="add">
|
||||||
|
<Password>
|
||||||
|
<Value>${build_password}</Value>
|
||||||
|
<PlainText>true</PlainText>
|
||||||
|
</Password>
|
||||||
|
<Group>administrators</Group>
|
||||||
|
<DisplayName>${build_username}</DisplayName>
|
||||||
|
<Name>${build_username}</Name>
|
||||||
|
<Description>Build Account</Description>
|
||||||
|
</LocalAccount>
|
||||||
|
</LocalAccounts>
|
||||||
|
</UserAccounts>
|
||||||
|
<FirstLogonCommands>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||||
|
<Description>Set Execution Policy 64-Bit</Description>
|
||||||
|
<Order>1</Order>
|
||||||
|
<RequiresUserInput>true</RequiresUserInput>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||||
|
<Description>Set Execution Policy 32-Bit</Description>
|
||||||
|
<Order>2</Order>
|
||||||
|
<RequiresUserInput>true</RequiresUserInput>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -File E:\windows-virtio.ps1</CommandLine>
|
||||||
|
<Order>3</Order>
|
||||||
|
<Description>Install VMware Tools</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
<SynchronousCommand wcm:action="add">
|
||||||
|
<CommandLine>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -File E:\windows-init.ps1</CommandLine>
|
||||||
|
<Order>4</Order>
|
||||||
|
<Description>Initial Configuration</Description>
|
||||||
|
</SynchronousCommand>
|
||||||
|
</FirstLogonCommands>
|
||||||
|
</component>
|
||||||
|
</settings>
|
||||||
|
</unattend>
|
||||||
@@ -318,7 +318,7 @@ variable "vm_boot_order" {
|
|||||||
variable "vm_boot_wait" {
|
variable "vm_boot_wait" {
|
||||||
type = string
|
type = string
|
||||||
description = "The time to wait before boot."
|
description = "The time to wait before boot."
|
||||||
default = "5s"
|
default = "10s"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "vm_boot_command" {
|
variable "vm_boot_command" {
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ source "proxmox-iso" "windows-desktop-pro" {
|
|||||||
|
|
||||||
// Removable Media Settings
|
// Removable Media Settings
|
||||||
additional_iso_files {
|
additional_iso_files {
|
||||||
iso_file = "${var.common_iso_storage}:iso/virtio-win.iso"
|
iso_file = "${var.common_iso_storage}:iso/virtio-win-0.1.285.iso"
|
||||||
iso_storage_pool = var.common_iso_storage
|
iso_storage_pool = var.common_iso_storage
|
||||||
cd_label = "VirtIO"
|
cd_label = "VirtIO"
|
||||||
unmount = true
|
unmount = true
|
||||||
@@ -223,7 +223,7 @@ source "proxmox-iso" "windows-desktop-ent" {
|
|||||||
|
|
||||||
// Removable Media Settings
|
// Removable Media Settings
|
||||||
additional_iso_files {
|
additional_iso_files {
|
||||||
iso_file = "${var.common_iso_storage}:iso/virtio-win.iso"
|
iso_file = "${var.common_iso_storage}:iso/virtio-win-0.1.285.iso"
|
||||||
iso_storage_pool = var.common_iso_storage
|
iso_storage_pool = var.common_iso_storage
|
||||||
cd_label = "VirtIO"
|
cd_label = "VirtIO"
|
||||||
unmount = true
|
unmount = true
|
||||||
|
|||||||
Reference in New Issue
Block a user