Created
June 12, 2025 05:40
-
-
Save abbaselmas/304892d385af7e09f32348eaddb2bb9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> | |
| <!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=tr-TR&Locale=tr-TR&Keyboard=0000041f&GeoLocation=235&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&BypassNetworkCheck=true&ComputerNameMode=Custom&ComputerName=AbbOS&CompactOsMode=Always&TimeZoneMode=Explicit&TimeZone=Turkey+Standard+Time&PartitionMode=Unattended&PartitionLayout=GPT&EspSize=300&RecoveryMode=None&WindowsEditionMode=Generic&WindowsEdition=pro&UserAccountMode=InteractiveLocal&PasswordExpirationMode=Unlimited&LockoutMode=Disabled&HideFiles=Hidden&ShowFileExtensions=true&LaunchToThisPC=true&TaskbarSearch=Hide&TaskbarIconsMode=Empty&DisableWidgets=true&LeftTaskbar=true&HideTaskViewButton=true&ShowAllTrayIcons=true&DisableBingResults=true&StartTilesMode=Empty&StartPinsMode=Empty&DisableDefender=true&DisableUac=true&DisableSac=true&DisableSmartScreen=true&DisableSystemRestore=true&AllowPowerShellScripts=true&DisableLastAccess=true&DisableAppSuggestions=true&PreventDeviceEncryption=true&HideEdgeFre=true&MakeEdgeUninstallable=true&DeleteWindowsOld=true&EffectsMode=Performance&DesktopIconsMode=Custom&IconControlPanel=true&IconDocuments=true&IconDownloads=true&IconPictures=true&IconRecycleBin=true&IconThisPC=true&IconUserFiles=true&WifiMode=Interactive&ExpressSettings=DisableAll&KeysMode=Skip&ColorMode=Default&WallpaperMode=Solid&WallpaperColor=%23008080&Remove3DViewer=true&RemoveBingSearch=true&RemoveCamera=true&RemoveClipchamp=true&RemoveClock=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGetHelp=true&RemoveHandwriting=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveMediaFeatures=true&RemoveMixedReality=true&RemoveZuneVideo=true&RemoveNews=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOneSync=true&RemoveOutlook=true&RemovePaint=true&RemovePaint3D=true&RemovePeople=true&RemovePhotos=true&RemovePowerAutomate=true&RemovePowerShellISE=true&RemoveQuickAssist=true&RemoveRecall=true&RemoveRdpClient=true&RemoveSkype=true&RemoveSolitaire=true&RemoveSpeech=true&RemoveStickyNotes=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWallet=true&RemoveWeather=true&RemoveWindowsMediaPlayer=true&RemoveWordPad=true&RemoveXboxApps=true&RemoveYourPhone=true&WdacMode=Skip--> | |
| <settings pass="offlineServicing"></settings> | |
| <settings pass="windowsPE"> | |
| <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
| <SetupUILanguage> | |
| <UILanguage>tr-TR</UILanguage> | |
| </SetupUILanguage> | |
| <InputLocale>041f:0000041f</InputLocale> | |
| <SystemLocale>tr-TR</SystemLocale> | |
| <UILanguage>tr-TR</UILanguage> | |
| <UserLocale>tr-TR</UserLocale> | |
| </component> | |
| <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
| <ImageInstall> | |
| <OSImage> | |
| <Compact>true</Compact> | |
| <InstallTo> | |
| <DiskID>0</DiskID> | |
| <PartitionID>3</PartitionID> | |
| </InstallTo> | |
| </OSImage> | |
| </ImageInstall> | |
| <UserData> | |
| <ProductKey> | |
| <Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key> | |
| </ProductKey> | |
| <AcceptEula>true</AcceptEula> | |
| </UserData> | |
| <UseConfigurationSet>false</UseConfigurationSet> | |
| <RunSynchronous> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>1</Order> | |
| <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 CREATE PARTITION MSR SIZE=16)"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>2</Order> | |
| <Path>cmd.exe /c ">>"X:\diskpart.txt" (echo CREATE PARTITION PRIMARY&echo FORMAT QUICK FS=NTFS LABEL="Windows")"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>3</Order> | |
| <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> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>4</Order> | |
| <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>5</Order> | |
| <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>6</Order> | |
| <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>7</Order> | |
| <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> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>8</Order> | |
| <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> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>9</Order> | |
| <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)"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>10</Order> | |
| <Path>cmd.exe /c ">>"X:\defender.vbs" (echo Execute = exec.ExitCode&echo End Function&echo Function FindHiveFiles&echo Set FindHiveFiles = CreateObject("Scripting.Dictionary"^)&echo For Each drive In fso.Drives)"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>11</Order> | |
| <Path>cmd.exe /c ">>"X:\defender.vbs" (echo If drive.IsReady And drive.DriveLetter ^<^> "X" Then&echo For Each folder In Array("$Windows.~BT\NewOS\Windows", "Windows"^))"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>12</Order> | |
| <Path>cmd.exe /c ">>"X:\defender.vbs" (echo file = fso.BuildPath(fso.BuildPath(drive.RootFolder, folder^), "System32\config\SYSTEM"^)&echo If fso.FileExists(file^) And fso.FileExists(file + ".LOG1"^) And fso.FileExists(file + ".LOG2"^) Then)"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>13</Order> | |
| <Path>cmd.exe /c ">>"X:\defender.vbs" (echo FindHiveFiles.Add file, Nothing&echo End If&echo Next&echo End If&echo Next&echo End Function&echo For Each file In FindHiveFiles)"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>14</Order> | |
| <Path>cmd.exe /c ">>"X:\defender.vbs" (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> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>15</Order> | |
| <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^))"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>16</Order> | |
| <Path>cmd.exe /c ">>"X:\defender.vbs" (echo Wend&echo For Each service In Array("Sense", "WdBoot", "WdFilter", "WdNisDrv", "WdNisSvc", "WinDefend"^))"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>17</Order> | |
| <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> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>18</Order> | |
| <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)"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>19</Order> | |
| <Path>cmd.exe /c ">>"X:\defender.vbs" (echo WScript.Sleep 1000&echo Next&echo Loop)"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>20</Order> | |
| <Path>cmd.exe /c "start /MIN cscript.exe //E:vbscript X:\defender.vbs"</Path> | |
| </RunSynchronousCommand> | |
| </RunSynchronous> | |
| </component> | |
| </settings> | |
| <settings pass="generalize"></settings> | |
| <settings pass="specialize"> | |
| <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
| <ComputerName>AbbOS</ComputerName> | |
| <TimeZone>Turkey Standard Time</TimeZone> | |
| </component> | |
| <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
| <RunSynchronous> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>1</Order> | |
| <Path>powershell.exe -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> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>2</Order> | |
| <Path>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\Specialize.ps1' -Raw | Invoke-Expression;"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>3</Order> | |
| <Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>4</Order> | |
| <Path>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\DefaultUser.ps1' -Raw | Invoke-Expression;"</Path> | |
| </RunSynchronousCommand> | |
| <RunSynchronousCommand wcm:action="add"> | |
| <Order>5</Order> | |
| <Path>reg.exe unload "HKU\DefaultUser"</Path> | |
| </RunSynchronousCommand> | |
| </RunSynchronous> | |
| </component> | |
| </settings> | |
| <settings pass="auditSystem"></settings> | |
| <settings pass="auditUser"></settings> | |
| <settings pass="oobeSystem"> | |
| <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
| <InputLocale>041f:0000041f</InputLocale> | |
| <SystemLocale>tr-TR</SystemLocale> | |
| <UILanguage>tr-TR</UILanguage> | |
| <UserLocale>tr-TR</UserLocale> | |
| </component> | |
| <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
| <OOBE> | |
| <ProtectYourPC>3</ProtectYourPC> | |
| <HideEULAPage>true</HideEULAPage> | |
| <HideWirelessSetupInOOBE>false</HideWirelessSetupInOOBE> | |
| <HideOnlineAccountScreens>true</HideOnlineAccountScreens> | |
| </OOBE> | |
| <FirstLogonCommands> | |
| <SynchronousCommand wcm:action="add"> | |
| <Order>1</Order> | |
| <CommandLine>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\FirstLogon.ps1' -Raw | Invoke-Expression;"</CommandLine> | |
| </SynchronousCommand> | |
| </FirstLogonCommands> | |
| </component> | |
| </settings> | |
| <Extensions xmlns="https://schneegans.de/windows/unattend-generator/"> | |
| <ExtractScript> | |
| param( | |
| [xml] $Document | |
| ); | |
| foreach( $file in $Document.unattend.Extensions.File ) { | |
| $path = [System.Environment]::ExpandEnvironmentVariables( $file.GetAttribute( 'path' ) ); | |
| mkdir -Path( $path | Split-Path -Parent ) -ErrorAction 'SilentlyContinue'; | |
| $encoding = switch( [System.IO.Path]::GetExtension( $path ) ) { | |
| { $_ -in '.ps1', '.xml' } { [System.Text.Encoding]::UTF8; } | |
| { $_ -in '.reg', '.vbs', '.js' } { [System.Text.UnicodeEncoding]::new( $false, $true ); } | |
| default { [System.Text.Encoding]::Default; } | |
| }; | |
| $bytes = $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() ); | |
| [System.IO.File]::WriteAllBytes( $path, $bytes ); | |
| } | |
| </ExtractScript> | |
| <File path="C:\Windows\Setup\Scripts\RemovePackages.ps1"> | |
| $selectors = @( | |
| 'Microsoft.Microsoft3DViewer'; | |
| 'Microsoft.BingSearch'; | |
| 'Microsoft.WindowsCamera'; | |
| 'Clipchamp.Clipchamp'; | |
| 'Microsoft.WindowsAlarms'; | |
| 'Microsoft.549981C3F5F10'; | |
| 'Microsoft.Windows.DevHome'; | |
| 'MicrosoftCorporationII.MicrosoftFamily'; | |
| 'Microsoft.WindowsFeedbackHub'; | |
| '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.MicrosoftSolitaireCollection'; | |
| 'Microsoft.MicrosoftStickyNotes'; | |
| '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.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 >> $logfile; | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\RemoveCapabilities.ps1"> | |
| $selectors = @( | |
| 'Language.Handwriting'; | |
| 'Browser.InternetExplorer'; | |
| 'MathRecognizer'; | |
| 'OneCoreUAP.OneSync'; | |
| 'Microsoft.Windows.MSPaint'; | |
| 'Microsoft.Windows.PowerShell.ISE'; | |
| 'App.Support.QuickAssist'; | |
| 'Language.Speech'; | |
| 'Language.TextToSpeech'; | |
| '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 >> $logfile; | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\RemoveFeatures.ps1"> | |
| $selectors = @( | |
| 'MediaPlayback'; | |
| 'Microsoft-RemoteDesktopConnection'; | |
| 'Recall'; | |
| ); | |
| $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 >> $logfile; | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\TaskbarLayoutModification.xml"> | |
| <LayoutModificationTemplate xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" Version="1"> | |
| <CustomTaskbarLayoutCollection PinListPlacement="Replace"> | |
| <defaultlayout:TaskbarLayout> | |
| <taskbar:TaskbarPinList> | |
| <taskbar:DesktopApp DesktopApplicationLinkPath="#leaveempty" /> | |
| </taskbar:TaskbarPinList> | |
| </defaultlayout:TaskbarLayout> | |
| </CustomTaskbarLayoutCollection> | |
| </LayoutModificationTemplate> | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\UnlockStartLayout.vbs"> | |
| HKU = &H80000003 | |
| Set reg = GetObject("winmgmts://./root/default:StdRegProv") | |
| Set fso = CreateObject("Scripting.FileSystemObject") | |
| If reg.EnumKey(HKU, "", sids) = 0 Then | |
| If Not IsNull(sids) Then | |
| For Each sid In sids | |
| key = sid + "\Software\Policies\Microsoft\Windows\Explorer" | |
| name = "LockedStartLayout" | |
| If reg.GetDWORDValue(HKU, key, name, existing) = 0 Then | |
| reg.SetDWORDValue HKU, key, name, 0 | |
| End If | |
| Next | |
| End If | |
| End If | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\UnlockStartLayout.xml"> | |
| <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
| <Triggers> | |
| <EventTrigger> | |
| <Enabled>true</Enabled> | |
| <Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Application"&gt;&lt;Select Path="Application"&gt;*[System[Provider[@Name='UnattendGenerator'] and EventID=1]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription> | |
| </EventTrigger> | |
| </Triggers> | |
| <Principals> | |
| <Principal id="Author"> | |
| <UserId>S-1-5-18</UserId> | |
| <RunLevel>LeastPrivilege</RunLevel> | |
| </Principal> | |
| </Principals> | |
| <Settings> | |
| <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> | |
| <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries> | |
| <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries> | |
| <AllowHardTerminate>true</AllowHardTerminate> | |
| <StartWhenAvailable>false</StartWhenAvailable> | |
| <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> | |
| <IdleSettings> | |
| <StopOnIdleEnd>true</StopOnIdleEnd> | |
| <RestartOnIdle>false</RestartOnIdle> | |
| </IdleSettings> | |
| <AllowStartOnDemand>true</AllowStartOnDemand> | |
| <Enabled>true</Enabled> | |
| <Hidden>false</Hidden> | |
| <RunOnlyIfIdle>false</RunOnlyIfIdle> | |
| <WakeToRun>false</WakeToRun> | |
| <ExecutionTimeLimit>PT72H</ExecutionTimeLimit> | |
| <Priority>7</Priority> | |
| </Settings> | |
| <Actions Context="Author"> | |
| <Exec> | |
| <Command>C:\Windows\System32\wscript.exe</Command> | |
| <Arguments>C:\Windows\Setup\Scripts\UnlockStartLayout.vbs</Arguments> | |
| </Exec> | |
| </Actions> | |
| </Task> | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\ShowAllTrayIcons.ps1"> | |
| if( [System.Environment]::OSVersion.Version.Build -lt 20000 ) { | |
| # Windows 10 | |
| Set-ItemProperty -LiteralPath 'Registry::HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer' -Name 'EnableAutoTray' -Type 'DWord' -Value 0 -Force; | |
| } else { | |
| # Windows 11 | |
| Register-ScheduledTask -TaskName 'ShowAllTrayIcons' -Xml $( | |
| Get-Content -LiteralPath "C:\Windows\Setup\Scripts\ShowAllTrayIcons.xml" -Raw; | |
| ); | |
| } | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\ShowAllTrayIcons.xml"> | |
| <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
| <Triggers> | |
| <LogonTrigger> | |
| <Repetition> | |
| <Interval>PT1M</Interval> | |
| <StopAtDurationEnd>false</StopAtDurationEnd> | |
| </Repetition> | |
| <Enabled>true</Enabled> | |
| </LogonTrigger> | |
| </Triggers> | |
| <Principals> | |
| <Principal id="Author"> | |
| <GroupId>S-1-5-32-545</GroupId> | |
| <RunLevel>LeastPrivilege</RunLevel> | |
| </Principal> | |
| </Principals> | |
| <Settings> | |
| <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> | |
| <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries> | |
| <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries> | |
| <AllowHardTerminate>true</AllowHardTerminate> | |
| <StartWhenAvailable>false</StartWhenAvailable> | |
| <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> | |
| <IdleSettings> | |
| <StopOnIdleEnd>true</StopOnIdleEnd> | |
| <RestartOnIdle>false</RestartOnIdle> | |
| </IdleSettings> | |
| <AllowStartOnDemand>true</AllowStartOnDemand> | |
| <Enabled>true</Enabled> | |
| <Hidden>false</Hidden> | |
| <RunOnlyIfIdle>false</RunOnlyIfIdle> | |
| <WakeToRun>false</WakeToRun> | |
| <ExecutionTimeLimit>PT72H</ExecutionTimeLimit> | |
| <Priority>7</Priority> | |
| </Settings> | |
| <Actions Context="Author"> | |
| <Exec> | |
| <Command>C:\Windows\System32\wscript.exe</Command> | |
| <Arguments>C:\Windows\Setup\Scripts\ShowAllTrayIcons.vbs</Arguments> | |
| </Exec> | |
| </Actions> | |
| </Task> | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\ShowAllTrayIcons.vbs"> | |
| HKCU = &H80000001 | |
| key = "Control Panel\NotifyIconSettings" | |
| Set reg = GetObject("winmgmts://./root/default:StdRegProv") | |
| If reg.EnumKey(HKCU, key, names) = 0 Then | |
| If Not IsNull(names) Then | |
| For Each name In names | |
| reg.SetDWORDValue HKCU, key + "\" + name, "IsPromoted", 1 | |
| Next | |
| End If | |
| End If | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\MakeEdgeUninstallable.ps1"> | |
| $ErrorActionPreference = 'Stop'; | |
| & { | |
| try { | |
| $params = @{ | |
| LiteralPath = 'C:\Windows\System32\IntegratedServicesRegionPolicySet.json'; | |
| Encoding = 'Utf8'; | |
| }; | |
| $o = Get-Content @params | ConvertFrom-Json; | |
| $o.policies | ForEach-Object -Process { | |
| if( $_.guid -eq '{1bca278a-5d11-4acf-ad2f-f9ab6d7f93a6}' ) { | |
| $_.defaultState = 'enabled'; | |
| } | |
| }; | |
| $o | ConvertTo-Json -Depth 9 | Out-File @params; | |
| } catch { | |
| $_; | |
| } | |
| } *>&1 >> 'C:\Windows\Setup\Scripts\MakeEdgeUninstallable.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:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml"> | |
| <LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"> | |
| <LayoutOptions StartTileGroupCellWidth="6" /> | |
| <DefaultLayoutOverride> | |
| <StartLayoutCollection> | |
| <StartLayout GroupCellWidth="6" xmlns="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" /> | |
| </StartLayoutCollection> | |
| </DefaultLayoutOverride> | |
| </LayoutModificationTemplate> | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\SetWallpaper.ps1"> | |
| Add-Type -TypeDefinition ' | |
| using System.Drawing; | |
| using System.Runtime.InteropServices; | |
| public static class WallpaperSetter { | |
| [DllImport("user32.dll")] | |
| private static extern bool SetSysColors( | |
| int cElements, | |
| int[] lpaElements, | |
| int[] lpaRgbValues | |
| ); | |
| [DllImport("user32.dll")] | |
| private static extern bool SystemParametersInfo( | |
| uint uiAction, | |
| uint uiParam, | |
| string pvParam, | |
| uint fWinIni | |
| ); | |
| public static void SetDesktopBackground(Color color) { | |
| SystemParametersInfo(20, 0, "", 0); | |
| SetSysColors(1, new int[] { 1 }, new int[] { ColorTranslator.ToWin32(color) }); | |
| } | |
| public static void SetDesktopImage(string file) { | |
| SystemParametersInfo(20, 0, file, 0); | |
| } | |
| } | |
| ' -ReferencedAssemblies 'System.Drawing'; | |
| function Set-WallpaperColor { | |
| param( | |
| [string] | |
| $HtmlColor | |
| ); | |
| $color = [System.Drawing.ColorTranslator]::FromHtml( $HtmlColor ); | |
| [WallpaperSetter]::SetDesktopBackground( $color ); | |
| Set-ItemProperty -Path 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers' -Name 'BackgroundType' -Type 'DWord' -Value 1 -Force; | |
| Set-ItemProperty -Path 'Registry::HKCU\Control Panel\Desktop' -Name 'WallPaper' -Type 'String' -Value '' -Force; | |
| Set-ItemProperty -Path 'Registry::HKCU\Control Panel\Colors' -Name 'Background' -Type 'String' -Value "$($color.R) $($color.G) $($color.B)" -Force; | |
| } | |
| function Set-WallpaperImage { | |
| param( | |
| [string] | |
| $LiteralPath | |
| ); | |
| [WallpaperSetter]::SetDesktopImage( $LiteralPath ); | |
| Set-ItemProperty -Path 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers' -Name 'BackgroundType' -Type 'DWord' -Value 0 -Force; | |
| Set-ItemProperty -Path 'Registry::HKCU\Control Panel\Desktop' -Name 'WallPaper' -Type 'String' -Value $LiteralPath -Force; | |
| } | |
| Set-WallpaperColor -HtmlColor '#008080'; | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\Specialize.ps1"> | |
| $scripts = @( | |
| { | |
| ReAgentc.exe /disable; | |
| Remove-Item -LiteralPath 'C:\Windows\System32\Recovery\Winre.wim' -Force -ErrorAction 'SilentlyContinue'; | |
| }; | |
| { | |
| reg.exe add "HKLM\SYSTEM\Setup\MoSetup" /v AllowUpgradesWithUnsupportedTPMOrCPU /t REG_DWORD /d 1 /f; | |
| }; | |
| { | |
| reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f; | |
| }; | |
| { | |
| 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; | |
| }; | |
| { | |
| Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\RemovePackages.ps1' -Raw | Invoke-Expression; | |
| }; | |
| { | |
| Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\RemoveCapabilities.ps1' -Raw | Invoke-Expression; | |
| }; | |
| { | |
| Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\RemoveFeatures.ps1' -Raw | Invoke-Expression; | |
| }; | |
| { | |
| net.exe accounts /lockoutthreshold:0; | |
| }; | |
| { | |
| net.exe accounts /maxpwage:UNLIMITED; | |
| }; | |
| { | |
| reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableCloudOptimizedContent" /t REG_DWORD /d 1 /f; | |
| [System.Diagnostics.EventLog]::CreateEventSource( 'UnattendGenerator', 'Application' ); | |
| }; | |
| { | |
| Register-ScheduledTask -TaskName 'UnlockStartLayout' -Xml $( Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\UnlockStartLayout.xml' -Raw ); | |
| }; | |
| { | |
| reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\CI\Policy" /v VerifiedAndReputablePolicyState /t REG_DWORD /d 0 /f; | |
| }; | |
| { | |
| reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v SmartScreenEnabled /t REG_SZ /d "Off" /f; | |
| reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WTDS\Components" /v ServiceEnabled /t REG_DWORD /d 0 /f; | |
| reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WTDS\Components" /v NotifyMalicious /t REG_DWORD /d 0 /f; | |
| reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WTDS\Components" /v NotifyPasswordReuse /t REG_DWORD /d 0 /f; | |
| reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WTDS\Components" /v NotifyUnsafeApp /t REG_DWORD /d 0 /f; | |
| }; | |
| { | |
| reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f | |
| }; | |
| { | |
| Set-ExecutionPolicy -Scope 'LocalMachine' -ExecutionPolicy 'RemoteSigned' -Force; | |
| }; | |
| { | |
| fsutil.exe behavior set disableLastAccess 1; | |
| }; | |
| { | |
| reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f; | |
| }; | |
| { | |
| reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 0 /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; | |
| }; | |
| { | |
| Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\MakeEdgeUninstallable.ps1' -Raw | Invoke-Expression; | |
| }; | |
| { | |
| Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\SetStartPins.ps1' -Raw | Invoke-Expression; | |
| }; | |
| { | |
| 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 -Activity 'Running scripts to customize your Windows installation. Do not close this window.' -PercentComplete $complete; | |
| & $script; | |
| $complete += $increment; | |
| } | |
| } *>&1 >> "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; | |
| }; | |
| { | |
| [System.Diagnostics.EventLog]::WriteEntry( 'UnattendGenerator', "User '$env:USERNAME' has requested to unlock the Start menu layout.", [System.Diagnostics.EventLogEntryType]::Information, 1 ); | |
| }; | |
| { | |
| Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'LaunchTo' -Type 'DWord' -Value 1; | |
| }; | |
| { | |
| Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Search' -Name 'SearchboxTaskbarMode' -Type 'DWord' -Value 0; | |
| }; | |
| { | |
| Set-ItemProperty -LiteralPath 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects' -Name 'VisualFXSetting' -Type 'DWord' -Value 2 -Force; | |
| }; | |
| { | |
| New-Item -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Force; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{645ff040-5081-101b-9f08-00aa002f954e}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{3add1653-eb32-4cb0-bbd7-dfa0abb5acca}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{1cf1260c-4dd0-4ebb-811f-33c572699fde}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{f874310e-b6b7-47dc-bc84-b9e6b38f5903}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{20d04fe0-3aea-1069-a2d8-08002b30309d}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{f02c1a0d-be21-4350-88b0-7367fc96ef3c}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{5399e694-6ce5-4d6c-8fce-1d8870fdcba0}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{a8cdff1c-4878-43be-b5fd-f8091c1c60d0}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{a0953c92-50dc-43bf-be83-3742fed03c9c}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{59031a47-3f72-44a7-89c5-5595fe6b30ee}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{b4bfcc3a-db2c-424c-b029-7fe99a87c641}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu' -Name '{374de290-123f-4565-9164-39c4925e467b}' -Value 0 -Type 'DWord'; | |
| New-Item -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Force; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{645ff040-5081-101b-9f08-00aa002f954e}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{3add1653-eb32-4cb0-bbd7-dfa0abb5acca}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{1cf1260c-4dd0-4ebb-811f-33c572699fde}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{f874310e-b6b7-47dc-bc84-b9e6b38f5903}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{20d04fe0-3aea-1069-a2d8-08002b30309d}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{f02c1a0d-be21-4350-88b0-7367fc96ef3c}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{5399e694-6ce5-4d6c-8fce-1d8870fdcba0}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{a8cdff1c-4878-43be-b5fd-f8091c1c60d0}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{a0953c92-50dc-43bf-be83-3742fed03c9c}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{59031a47-3f72-44a7-89c5-5595fe6b30ee}' -Value 0 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{b4bfcc3a-db2c-424c-b029-7fe99a87c641}' -Value 1 -Type 'DWord'; | |
| Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel' -Name '{374de290-123f-4565-9164-39c4925e467b}' -Value 0 -Type 'DWord'; | |
| }; | |
| { | |
| Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\SetWallpaper.ps1' -Raw | Invoke-Expression; | |
| }; | |
| { | |
| 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 -Activity 'Running scripts to configure this user account. Do not close this window.' -PercentComplete $complete; | |
| & $script; | |
| $complete += $increment; | |
| } | |
| } *>&1 >> "$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; | |
| }; | |
| { | |
| 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\Policies\Microsoft\Windows\Explorer" /v "StartLayoutFile" /t REG_SZ /d "C:\Windows\Setup\Scripts\TaskbarLayoutModification.xml" /f; | |
| reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\Explorer" /v "LockedStartLayout" /t REG_DWORD /d 1 /f; | |
| }; | |
| { | |
| reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f; | |
| }; | |
| { | |
| Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\ShowAllTrayIcons.ps1' -Raw | Invoke-Expression; | |
| }; | |
| { | |
| reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowTaskViewButton /t REG_DWORD /d 0 /f; | |
| }; | |
| { | |
| reg.exe add "HKU\DefaultUser\Software\Microsoft\Edge\SmartScreenEnabled" /ve /t REG_DWORD /d 0 /f; | |
| reg.exe add "HKU\DefaultUser\Software\Microsoft\Edge\SmartScreenPuaEnabled" /ve /t REG_DWORD /d 0 /f; | |
| reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\AppHost" /v EnableWebContentEvaluation /t REG_DWORD /d 0 /f; | |
| reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\AppHost" /v PreventOverride /t REG_DWORD /d 0 /f; | |
| }; | |
| { | |
| $names = @( | |
| 'ContentDeliveryAllowed'; | |
| 'FeatureManagementEnabled'; | |
| 'OEMPreInstalledAppsEnabled'; | |
| 'PreInstalledAppsEnabled'; | |
| 'PreInstalledAppsEverEnabled'; | |
| 'SilentInstalledAppsEnabled'; | |
| 'SoftLandingEnabled'; | |
| 'SubscribedContentEnabled'; | |
| 'SubscribedContent-310093Enabled'; | |
| 'SubscribedContent-338387Enabled'; | |
| 'SubscribedContent-338388Enabled'; | |
| 'SubscribedContent-338389Enabled'; | |
| 'SubscribedContent-338393Enabled'; | |
| '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\Explorer\Advanced" /v TaskbarAl /t REG_DWORD /d 0 /f; | |
| }; | |
| { | |
| reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\Explorer" /v DisableSearchBoxSuggestions /t REG_DWORD /d 1 /f; | |
| }; | |
| { | |
| reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v "UnattendedSetup" /t REG_SZ /d "powershell.exe -NoProfile -Command \""Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\UserOnce.ps1' -Raw | Invoke-Expression;\""" /f; | |
| }; | |
| ); | |
| & { | |
| [float] $complete = 0; | |
| [float] $increment = 100 / $scripts.Count; | |
| foreach( $script in $scripts ) { | |
| Write-Progress -Activity 'Running scripts to modify the default user’’s registry hive. Do not close this window.' -PercentComplete $complete; | |
| & $script; | |
| $complete += $increment; | |
| } | |
| } *>&1 >> "C:\Windows\Setup\Scripts\DefaultUser.log"; | |
| </File> | |
| <File path="C:\Windows\Setup\Scripts\FirstLogon.ps1"> | |
| $scripts = @( | |
| { | |
| Disable-ComputerRestore -Drive 'C:\'; | |
| }; | |
| { | |
| cmd.exe /c "rmdir C:\Windows.old"; | |
| }; | |
| ); | |
| & { | |
| [float] $complete = 0; | |
| [float] $increment = 100 / $scripts.Count; | |
| foreach( $script in $scripts ) { | |
| Write-Progress -Activity 'Running scripts to finalize your Windows installation. Do not close this window.' -PercentComplete $complete; | |
| & $script; | |
| $complete += $increment; | |
| } | |
| } *>&1 >> "C:\Windows\Setup\Scripts\FirstLogon.log"; | |
| </File> | |
| </Extensions> | |
| </unattend> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment