Powershell is quicker
# Run in elevated PowerShell for HKLM changes.
function Ensure-Key($path) {
if (-not (Test-Path $path)) { New-Item -Path $path -Force | Out-Null }
}
function Set-String($path, $name, $value) {
Ensure-Key $path
New-ItemProperty -Path $path -Name $name -Value $value -PropertyType String -Force | Out-Null
}
function Set-Dword($path, $name, [int]$value) {
Ensure-Key $path
New-ItemProperty -Path $path -Name $name -Value $value -PropertyType DWord -Force | Out-Null
}
# 1) Classic context menu
Ensure-Key 'HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32'
Set-ItemProperty -Path 'HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32' -Name '(default)' -Value '' -Type String
# 2) Faster shutdown
Set-String 'HKCU:\Control Panel\Desktop' 'AutoEndTasks' '1'
Set-String 'HKCU:\Control Panel\Desktop' 'WaitToKillAppTimeout' '2000'
Set-String 'HKCU:\Control Panel\Desktop' 'HungAppTimeout' '2000'
Set-String 'HKLM:\SYSTEM\CurrentControlSet\Control' 'WaitToKillServiceTimeout' '2000'
# 3) Hide web search
Set-Dword 'HKCU:\Software\Policies\Microsoft\Windows\Explorer' 'DisableSearchBoxSuggestions' 1
# 4) Disable lock screen
Set-Dword 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization' 'NoLockScreen' 1
# 5) Skip Settings home
Set-String 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' 'SettingsPageVisibility' 'hide:home'
# 6) Verbose status
Set-Dword 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' 'verbosestatus' 1
# 7) Menu show delay = 0
Set-String 'HKCU:\Control Panel\Desktop' 'MenuShowDelay' '0'
# 8) Show seconds in clock
Set-Dword 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' 'ShowSecondsInSystemClock' 1
# 9) Add favorite app on desktop context menu (optional)
# $exe = 'C:\Program Files\Notepad++\notepad++.exe'; $name = 'Notepad++'
# $base = "HKCR:\Directory\Background\shell\$name"
# Ensure-Key $base; Set-String $base 'Icon' "`"$exe`""
# Ensure-Key "$base\Command"; Set-String "$base\Command" '(default)' "`"$exe`""
# Set-String $base 'Position' 'Top' # optional
# 10) LastActiveClick on taskbar
Set-Dword 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' 'LastActiveClick' 1
# 11) Startup delay removal
Set-Dword 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize' 'StartupDelayInMSec' 0
Set-Dword 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize' 'WaitForIdleState' 0
# Restart Explorer to apply most UI tweaks immediately (safe)
Get-Process explorer -ErrorAction SilentlyContinue | Stop-Process -Force
Start-Process explorer.exe
Write-Host "Done. Some changes may require a reboot."