en-US 00000-00000-00000-00000-00000 OnError true false 1 reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f 2 reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f 3 reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f TEMPNAME Singapore Standard Time 1 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;" 2 powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\Specialize.ps1" 3 reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" 4 powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\DefaultUser.ps1" 5 reg.exe unload "HKU\DefaultUser" 0409:00000409 en-US en-US en-US 3 true true true 1 powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\FirstLogon.ps1" 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 ); } return 'WINPC-{0:D3}' -f ( Get-Random -Minimum 0 -Maximum 999 ); $ErrorActionPreference = 'Stop'; Set-StrictMode -Version 'Latest'; & { $newName = ( Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\ComputerName.txt' -Raw ).Trim(); if( [string]::IsNullOrWhitespace( $newName ) ) { throw "No computer name was provided."; } $keys = @( @{ LiteralPath = 'Registry::HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName'; Name = 'ComputerName'; }; @{ LiteralPath = 'Registry::HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters'; Name = 'Hostname'; }; @{ LiteralPath = 'Registry::HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters'; Name = 'NV Hostname'; }; ); while( $true ) { foreach( $key in $keys ) { Set-ItemProperty @key -Type 'String' -Value $newName; } Start-Sleep -Milliseconds 50; } } *>&1 | Out-String -Width 1KB -Stream >> 'C:\Windows\Setup\Scripts\SetComputerName.log'; $selectors = @( 'Microsoft.Microsoft3DViewer'; 'Microsoft.BingSearch'; 'Clipchamp.Clipchamp'; 'Microsoft.Copilot'; '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.PowerAutomateDesktop'; 'MicrosoftCorporationII.QuickAssist'; 'Microsoft.SkypeApp'; 'Microsoft.MicrosoftSolitaireCollection'; 'Microsoft.MicrosoftStickyNotes'; 'MicrosoftTeams'; 'MSTeams'; 'Microsoft.Todos'; '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 | Out-String -Width 1KB -Stream >> $logfile; $selectors = @( 'Language.Handwriting'; 'Browser.InternetExplorer'; 'MathRecognizer'; 'OneCoreUAP.OneSync'; 'OpenSSH.Client'; 'Microsoft.Windows.MSPaint'; 'Microsoft.Windows.PowerShell.ISE'; 'App.Support.QuickAssist'; '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; $selectors = @( 'MediaPlayback'; 'MicrosoftWindowsPowerShellV2Root'; '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 | Out-String -Width 1KB -Stream >> $logfile; <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 DesktopApplicationID="Microsoft.Windows.Explorer" /> </taskbar:TaskbarPinList> </defaultlayout:TaskbarLayout> </CustomTaskbarLayoutCollection> </LayoutModificationTemplate> 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 <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>false</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>false</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> <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>false</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>false</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>%windir%\System32\conhost.exe</Command> <Arguments>--headless %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden -NoProfile -NonInteractive -Command "Set-ItemProperty -Path 'Registry::HKCU\Control Panel\NotifyIconSettings\*' -Name 'IsPromoted' -Value 1 -Type 'DWord';"</Arguments> </Exec> </Actions> </Task> <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> <Triggers> <BootTrigger> <Repetition> <Interval>PT4H</Interval> <StopAtDurationEnd>false</StopAtDurationEnd> </Repetition> <Enabled>true</Enabled> </BootTrigger> <RegistrationTrigger> <Repetition> <Interval>PT4H</Interval> <StopAtDurationEnd>false</StopAtDurationEnd> </Repetition> <Enabled>true</Enabled> </RegistrationTrigger> </Triggers> <Principals> <Principal id="Author"> <UserId>S-1-5-19</UserId> <RunLevel>LeastPrivilege</RunLevel> </Principal> </Principals> <Settings> <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>false</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>%windir%\System32\conhost.exe</Command> <Arguments>--headless %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden -NoProfile -NonInteractive -Command "$p = @{ LiteralPath = 'Registry::HKLM\Software\Microsoft\WindowsUpdate\UX\Settings'; Type = 'DWord'; }; $h = [datetime]::Now.Hour; Set-ItemProperty @p -Name 'ActiveHoursStart' -Value (($h + 23) % 24); Set-ItemProperty @p -Name 'ActiveHoursEnd' -Value (($h + 11) % 24); Set-ItemProperty @p -Name 'SmartActiveHoursState' -Value 2;"</Arguments> </Exec> </Actions> </Task> $json = '{ "pinnedList": [ { "packagedAppId":"Microsoft.WindowsTerminal_8wekyb3d8bbwe!App" } , { "desktopAppLink":"%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Windows PowerShell\\Windows PowerShell.lnk" } , { "desktopAppLink": "%ALLUSERSPROFILE%\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Edge.lnk" } , { "desktopAppLink":"%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\System Tools\\Control Panel.lnk" } ] }'; 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'; <LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"> <LayoutOptions StartTileGroupCellWidth="6" /> <DefaultLayoutOverride> <StartLayoutCollection> <defaultlayout:StartLayout GroupCellWidth="6"> <start:Group Name=""> <start:Tile Size="2x2" Column="4" Row="0" AppUserModelID="windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" /> <start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Microsoft Edge.lnk" /> <start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" /> </start:Group> </defaultlayout:StartLayout> </StartLayoutCollection> </DefaultLayoutOverride> </LayoutModificationTemplate> $lightThemeSystem = 0; $lightThemeApps = 0; $accentColorOnStart = 1; $enableTransparency = 0; $htmlAccentColor = '#0063B1'; & { $params = @{ LiteralPath = 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize'; Force = $true; Type = 'DWord'; }; Set-ItemProperty @params -Name 'SystemUsesLightTheme' -Value $lightThemeSystem; Set-ItemProperty @params -Name 'AppsUseLightTheme' -Value $lightThemeApps; Set-ItemProperty @params -Name 'ColorPrevalence' -Value $accentColorOnStart; Set-ItemProperty @params -Name 'EnableTransparency' -Value $enableTransparency; }; & { Add-Type -AssemblyName 'System.Drawing'; $accentColor = [System.Drawing.ColorTranslator]::FromHtml( $htmlAccentColor ); function ConvertTo-DWord { param( [System.Drawing.Color] $Color ); [byte[]] $bytes = @( $Color.R; $Color.G; $Color.B; $Color.A; ); return [System.BitConverter]::ToUInt32( $bytes, 0); } $startColor = [System.Drawing.Color]::FromArgb( 0xD2, $accentColor ); Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent' -Name 'StartColorMenu' -Value( ConvertTo-DWord -Color $accentColor ) -Type 'DWord' -Force; Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent' -Name 'AccentColorMenu' -Value( ConvertTo-DWord -Color $accentColor ) -Type 'DWord' -Force; Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\DWM' -Name 'AccentColor' -Value( ConvertTo-DWord -Color $accentColor ) -Type 'DWord' -Force; $params = @{ LiteralPath = 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent'; Name = 'AccentPalette'; }; $palette = Get-ItemPropertyValue @params; $index = 20; $palette[ $index++ ] = $accentColor.R; $palette[ $index++ ] = $accentColor.G; $palette[ $index++ ] = $accentColor.B; $palette[ $index++ ] = $accentColor.A; Set-ItemProperty @params -Value $palette -Type 'Binary' -Force; }; $url = 'https://w.wallhaven.cc/full/dp/wallhaven-dp6g8l.png'; & { $ProgressPreference = 'SilentlyContinue'; ( Invoke-WebRequest -Uri $url -UseBasicParsing -TimeoutSec 30 ).Content; }; 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 ); if( $LiteralPath | Test-Path ) { [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; } else { "Cannot use '$LiteralPath' as a desktop wallpaper because that file does not exist."; } } Set-WallpaperImage -LiteralPath 'C:\Windows\Setup\Scripts\Wallpaper'; foreach( $drive in [System.IO.DriveInfo]::GetDrives() ) { if( $found = Join-Path -Path $drive.RootDirectory -ChildPath 'https://w.wallhaven.cc/full/dp/wallhaven-dp6g8l.png' -Resolve -ErrorAction 'SilentlyContinue' ) { return [System.IO.File]::ReadAllBytes( $found ); } } 'Cannot find any files that match pattern.' | Write-Warning; # ================================================ # Custom Regional Format Fix Script (en-US) # ================================================ $reg = "HKCU:\Control Panel\International" # --- Date formats --- Set-ItemProperty $reg -Name sShortDate -Value "dd-MMM-yyyy" # e.g. 25-Aug-2025 Set-ItemProperty $reg -Name sLongDate -Value "dddd, dd MMMM yyyy" # e.g. Monday, 25 August 2025 # --- Time formats --- Set-ItemProperty $reg -Name sShortTime -Value "HH:mm" # e.g. 14:05 Set-ItemProperty $reg -Name sTimeFormat -Value "H:mm:ss" # e.g. 14:05:09 Set-ItemProperty $reg -Name iTime -Value "1" # 24-hour clock # --- Week start --- # (0=Mon,1=Tue,...,6=Sun) Set-ItemProperty $reg -Name iFirstDayOfWeek -Value "6" # --- Digits --- Set-ItemProperty $reg -Name sNativeDigits -Value "0123456789" # --- Apply to current session --- $c = [System.Globalization.CultureInfo]::GetCultureInfo("en-US").Clone() $c.DateTimeFormat.ShortDatePattern = "dd-MMM-yyyy" $c.DateTimeFormat.LongDatePattern = "dddd, dd MMMM yyyy" $c.DateTimeFormat.ShortTimePattern = "HH:mm" $c.DateTimeFormat.LongTimePattern = "H:mm:ss" $c.DateTimeFormat.FirstDayOfWeek = [System.DayOfWeek]::Sunday $c.NumberFormat.NativeDigits = @('0','1','2','3','4','5','6','7','8','9') [System.Threading.Thread]::CurrentThread.CurrentCulture = $c [System.Threading.Thread]::CurrentThread.CurrentUICulture = $c # --- Show results --- Write-Host "Regional format has been set to:" Write-Host "Short Date : $(Get-Date -Format 'dd-MMM-yyyy')" Write-Host "Long Date : $(Get-Date -Format 'dddd, dd MMMM yyyy')" Write-Host "Short Time : $(Get-Date -Format 'HH:mm')" Write-Host "Long Time : $(Get-Date -Format 'H:mm:ss')" Write-Host "First Day of Week : Sunday" :: make uac using cmd reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 1 /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 5 /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v PromptOnSecureDesktop /t REG_DWORD /d 0 /f :: taskbar never combine and dont show label reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarGlomLevel /t REG_DWORD /d 2 /f ::explorer win 11 compact mode - jadi reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v UseCompactMode /t REG_DWORD /d 1 /f :: system notification Disable "Suggest ways to get the most out of Windows" reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement" /v ScoobeSystemSettingEnabled /t REG_DWORD /d 0 /f :: accessibility Always show scrollbars set to ON reg add "HKCU\Control Panel\Accessibility" /v DynamicScrollbars /t REG_DWORD /d 0 /f :: cross device resume reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\CrossDeviceResume\Configuration" /v IsResumeAllowed /t REG_DWORD /d 0 /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\CrossDeviceResume\Configuration" /v IsOneDriveResumeAllowed /t REG_DWORD /d 0 /f :: Edge stuff reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v AllowGamesMenu /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v AlternateErrorPagesEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v AutoImportAtFirstRun /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v ConfigureDoNotTrack /t REG_DWORD /d 1 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v CryptoWalletEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v DefaultBrowserSettingEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v DiagnosticData /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v EdgeAssetDeliveryServiceEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v EdgeCollectionsEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v EdgeShoppingAssistantEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v HideFirstRunExperience /t REG_DWORD /d 1 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v HubsSidebarEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v ImportBrowserSettings /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v ImportExtensions /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v ImportFavorites /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v ImportHistory /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v ImportSavedPasswords /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v MicrosoftEdgeInsiderPromotionEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v PersonalizationReportingEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v ShowMicrosoftRewards /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v ShowPDFDefaultRecommendationsEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v ShowRecommendationsEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v UserFeedbackAllowed /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v WalletDonationEnabled /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v WebWidgetAllowed /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\EdgeUpdate" /v CreateDesktopShortcutDefault /t REG_DWORD /d 0 /f :: location setting big switch reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /v Value /t REG_SZ /d Allow /f :: windows using hardware sensor to locate like gps reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v SensorPermissionState /t REG_DWORD /d 0 /f :: location service background apps reg add "HKLM\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" /v Status /t REG_DWORD /d 0 /f reg add "HKLM\SYSTEM\Maps" /v AutoUpdateEnabled /t REG_DWORD /d 0 /f :: disable background apps reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f :: disable Malicious Software Removal Tool MRT reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v DontOfferThroughWUAU /t REG_DWORD /d 1 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v DontReportInfectionInformation /t REG_DWORD /d 1 /f :: Disable Gamebar reg add "HKCU\Software\Microsoft\GameBar" /v ShowStartupPanel /t REG_DWORD /d 0 /f ::MS Edge ext - uOLite - new blank tab reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist" /v 1 /t REG_SZ /d "cimighlppcgcoapaliogpjjdehbnofhn;https://edge.microsoft.com/extensionwebstorebase/v1/crx" /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist" /v 2 /t REG_SZ /d "pfbmpcgfjncjakgfpddijlbdpjnhnfem;https://edge.microsoft.com/extensionwebstorebase/v1/crx" /f ::MS Edge disable copilot chat reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "Microsoft365CopilotChatIconEnabled" /t REG_DWORD /d 0 /f ::Disable news and interest for windows 10 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" /v EnableFeeds /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\NewsAndInterests\AllowNewsAndInterests" /v value /t REG_DWORD /d 0 /f ::disable search highlights for w11 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SearchSettings" /v IsAADCloudSearchEnabled /t REG_DWORD /d 0 /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SearchSettings" /v IsDeviceSearchHistoryEnabled /t REG_DWORD /d 0 /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SearchSettings" /v IsDynamicSearchBoxEnabled /t REG_DWORD /d 0 /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SearchSettings" /v IsMSACloudSearchEnabled /t REG_DWORD /d 0 /f ::disable search hightlights for w10 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Feeds\DSB" /v ShowDynamicContent /t REG_DWORD /d 0 /f ::snap setting reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v DockMoving /t REG_DWORD /d 0 /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v EnableSnapAssistFlyout /t REG_DWORD /d 0 /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v EnableSnapBar /t REG_DWORD /d 0 /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v SnapAssist /t REG_DWORD /d 0 /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v SnapAssistHover /t REG_DWORD /d 0 /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v SnapAssistWithoutEdge /t REG_DWORD /d 0 /f ::Disable drag tray in windows 11 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\CDP" /v DragTrayEnabled /t REG_DWORD /d 0 /f ::start layout more pins reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_Layout /t REG_DWORD /d 1 /f ::write note to desktop ( echo To change some settings, use cmd with admin to delete the following registry keys: echo. echo ::MS Edge extesions 1 UOlite 2 Blank New tab, if you want ads in your browser echo. echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist" /v 1 /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist" /v 2 /f echo. echo ::MS Edge copilot chat, if you want copilot in your edge echo. echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v Microsoft365CopilotChatIconEnabled /f echo. echo ::Other MS Edge stuff, if you want bloat in your edge echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "AlternateErrorPagesEnabled" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "AutoImportAtFirstRun" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "ConfigureDoNotTrack" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "CryptoWalletEnabled" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "DefaultBrowserSettingEnabled" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "DiagnosticData" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "EdgeAssetDeliveryServiceEnabled" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "EdgeCollectionsEnabled" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "EdgeShoppingAssistantEnabled" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "ImportBrowserSettings" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "ImportExtensions" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "ImportFavorites" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "ImportHistory" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "ImportSavedPasswords" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "MicrosoftEdgeInsiderPromotionEnabled" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "PersonalizationReportingEnabled" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "ShowMicrosoftRewards" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "ShowRecommendationsEnabled" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "UserFeedbackAllowed" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "WalletDonationEnabled" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "WebWidgetAllowed" /f echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\EdgeUpdate" /v "CreateDesktopShortcutDefault" /f echo. echo ::Enable Windows Defender tray icon echo. echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Systray" /v "HideSystray" /f echo. echo ::Disable All Tray Icon Visible on Windows 11 echo. echo schtasks /delete /tn "ShowAllTrayIcons" /f echo. echo ::Reenable News and Interest echo reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" /v EnableFeeds /f echo reg delete "HKLM\SOFTWARE\Microsoft\PolicyManager\default\NewsAndInterests\AllowNewsAndInterests" /v value /f ) > "%USERPROFILE%\Desktop\notes.txt" $scripts = @( { & 'C:\Windows\Setup\Scripts\GetComputerName.ps1' > 'C:\Windows\Setup\Scripts\ComputerName.txt'; Start-Process -FilePath ( Get-Process -Id $PID ).Path -ArgumentList '-ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\SetComputerName.ps1"' -WindowStyle 'Hidden'; Start-Sleep -Seconds 10; }; { reg.exe add "HKLM\SYSTEM\Setup\MoSetup" /v AllowUpgradesWithUnsupportedTPMOrCPU /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; }; { & '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\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\Policies\Microsoft\Windows Defender Security Center\Systray" /v HideSystray /t REG_DWORD /d 1 /f; }; { reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /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; }; { icacls.exe C:\ /remove:g "*S-1-5-11" }; { Remove-Item -LiteralPath 'C:\Users\Public\Desktop\Microsoft Edge.lnk' -ErrorAction 'SilentlyContinue' -Verbose; }; { Set-ExecutionPolicy -Scope 'LocalMachine' -ExecutionPolicy 'RemoteSigned' -Force; }; { fsutil.exe behavior set disableLastAccess 1; }; { reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AUOptions /t REG_DWORD /d 4 /f; reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f; }; { Register-ScheduledTask -TaskName 'MoveActiveHours' -Xml $( Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\MoveActiveHours.xml' -Raw ); }; { 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 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 1 -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 1 -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 1 -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; }; { reg.exe add "HKU\.DEFAULT\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 10 /f; }; { reg.exe add "HKLM\System\CurrentControlSet\Control\DeviceGuard" /v "EnableVirtualizationBasedSecurity" /t REG_DWORD /d 0 /f; reg.exe add "HKLM\System\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /t REG_DWORD /d 0 /f; reg.exe add "HKLM\System\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "EnabledBootId" /t REG_DWORD /d 0 /f; reg.exe add "HKLM\System\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "WasEnabledBy" /t REG_DWORD /d 0 /f; }; { reg.exe add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "DisableAutomaticRestartSignOn" /t REG_DWORD /d 1 /f; }; { try { $bytes = & 'C:\Windows\Setup\Scripts\GetWallpaper.ps1'; [System.IO.File]::WriteAllBytes( 'C:\Windows\Setup\Scripts\Wallpaper', $bytes ); } catch { $_; } }; { try { $bytes = & 'C:\Windows\Setup\Scripts\GetLockScreenImage.ps1'; [System.IO.File]::WriteAllBytes( 'C:\Windows\Setup\Scripts\LockScreenImage', $bytes ); reg.exe add "HKLM\Software\Microsoft\Windows\CurrentVersion\PersonalizationCSP" /v LockScreenImagePath /t REG_SZ /d "C:\Windows\Setup\Scripts\LockScreenImage" /f; } catch { $_; } }; ); & { [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 $( $str = $script.ToString().Trim() -replace '\s+', ' '; $max = 100; if( $str.Length -le $max ) { $str; } else { $str.Substring( 0, $max - 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"; $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 ); }; { @( Get-ChildItem -LiteralPath $env:USERPROFILE -Force -Recurse -Depth 2; ) | Where-Object -FilterScript { $_.Attributes.HasFlag( [System.IO.FileAttributes]::ReparsePoint ); } | Remove-Item -Force -Recurse -Verbose; }; { Remove-Item -LiteralPath "${env:USERPROFILE}\Desktop\Microsoft Edge.lnk" -ErrorAction 'SilentlyContinue' -Verbose; }; { 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 1; }; { Set-ItemProperty -LiteralPath 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects' -Name 'VisualFXSetting' -Type 'DWord' -Value 3 -Force; }; { Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Start' -Name 'VisiblePlaces' -Value $( [convert]::FromBase64String('hghzUqpRQ0Kfeyd2WEZZ1A==') ) -Type 'Binary'; }; { & 'C:\Windows\Setup\Scripts\SetColorTheme.ps1'; }; { & 'C:\Windows\Setup\Scripts\SetWallpaper.ps1'; }; { 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 $( $str = $script.ToString().Trim() -replace '\s+', ' '; $max = 100; if( $str.Length -le $max ) { $str; } else { $str.Substring( 0, $max - 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"; $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\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; }; { 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; ); } }; { 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-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\Explorer\Advanced" /v TaskbarAl /t REG_DWORD /d 0 /f; }; { reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarDeveloperSettings" /v TaskbarEndTask /t REG_DWORD /d 1 /f; }; { reg.exe add "HKU\DefaultUser\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 10 /f; }; { reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\DWM" /v ColorPrevalence /t REG_DWORD /d 1 /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 $( $str = $script.ToString().Trim() -replace '\s+', ' '; $max = 100; if( $str.Length -le $max ) { $str; } else { $str.Substring( 0, $max - 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"; $scripts = @( { @( Get-ChildItem -LiteralPath 'C:\' -Force; Get-ChildItem -LiteralPath 'C:\Users' -Force; Get-ChildItem -LiteralPath 'C:\Users\Default' -Force -Recurse -Depth 2; Get-ChildItem -LiteralPath 'C:\Users\Public' -Force -Recurse -Depth 2; Get-ChildItem -LiteralPath 'C:\ProgramData' -Force; ) | Where-Object -FilterScript { $_.Attributes.HasFlag( [System.IO.FileAttributes]::ReparsePoint ); } | Remove-Item -Force -Recurse -Verbose; }; { Disable-ComputerRestore -Drive 'C:\'; }; { cmd.exe /c "rmdir C:\Windows.old"; }; { & 'C:\Windows\Setup\Scripts\unattend-01.ps1'; }; { C:\Windows\Setup\Scripts\unattend-02.cmd; }; { 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 $( $str = $script.ToString().Trim() -replace '\s+', ' '; $max = 100; if( $str.Length -le $max ) { $str; } else { $str.Substring( 0, $max - 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";