├── $WinpeDriver$ └── Add or Export Your Driver's Here ├── .gitignore ├── Add-More-Features.ps1 ├── CHANGELOGS.md ├── LICENSE ├── README.md ├── Screenshots ├── AF-BM.png ├── AF-DE.png ├── AF-EX.png ├── AF-EXOP.png ├── AF-EXSE.png ├── AF-EXSM.png ├── AF-EXSO.png ├── AF-EXUI.png ├── AF-IA.png ├── AF-ST.png ├── AF-TM.png ├── ORG-BM.png ├── ORG-D.png ├── ORG-TM.png └── RF-XML.png ├── Updates.ps1 ├── WinISO └── Add Your Windows ISO Here └── ventoy ├── autounattend.xml └── ventoy.json /$WinpeDriver$/Add or Export Your Driver's Here: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/$WinpeDriver$/Add or Export Your Driver's Here -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Update.ps1 2 | Optimize-Windows.zip -------------------------------------------------------------------------------- /Add-More-Features.ps1: -------------------------------------------------------------------------------- 1 | # 0+ Check if the script is running with administrative privileges 2 | $ErrorActionPreference = 'SilentlyContinue' 3 | if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { 4 | Start-Process powershell -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs 5 | exit 6 | } 7 | 8 | # 1+ Directories and Functions 9 | $desktopPath = "C:\Users\Public\Desktop" 10 | $customPath = "HKLM:\Software\ShivaayOS" 11 | $shivaayPath = "$desktopPath\Shivaay" 12 | if (Test-Path $customPath) { 13 | try { 14 | $regValue = Get-ItemProperty -Path $customPath -Name "ShivaayFolderPath" -ErrorAction Stop 15 | $shivaayPath = $regValue."ShivaayFolderPath" 16 | } 17 | catch {} 18 | } 19 | $optimizationPath = "$shivaayPath\Optimizations" 20 | $securityPath = "$shivaayPath\Security" 21 | $softwaresPath = "$shivaayPath\Softwares" 22 | $managementPath = "$shivaayPath\System Management" 23 | $interfacePath = "$shivaayPath\User Interface" 24 | 25 | # 1.1+ Create Shortcut 26 | function Create-Shortcut { 27 | param ( 28 | [string]$target, 29 | [string]$shortcutName, 30 | [string]$shortcutType, 31 | [string]$shortcutPath = $shivaayPath 32 | ) 33 | $shell = New-Object -ComObject WScript.Shell 34 | $fullPath = Join-Path $shortcutPath $shortcutName 35 | $softPath = Join-Path $softwaresPath $shortcutName 36 | if ($shortcutType -eq "url") { 37 | $internetShortcut = $shell.CreateShortcut($softPath) 38 | $internetShortcut.TargetPath = $target 39 | $internetShortcut.Save() 40 | } else { 41 | $shortcut = $shell.CreateShortcut($fullPath) 42 | $shortcut.TargetPath = "powershell.exe" 43 | $shortcut.Arguments = "-NoProfile -ExecutionPolicy RemoteSigned -Command `"$target`"" 44 | $shortcut.Save() 45 | } 46 | } 47 | 48 | # 1.2+ Create Files 49 | function Create-File { 50 | param ( 51 | [string]$fileContent, 52 | [string]$fileName, 53 | [string]$fileDirectory 54 | ) 55 | $outputFilePath = [System.IO.Path]::Combine($fileDirectory, "$fileName") 56 | $fileContent | Out-File -FilePath $outputFilePath -Encoding ASCII 57 | } 58 | 59 | # 1.3+ Add Features 60 | function Add-Fea { 61 | param ( 62 | [string]$FN, 63 | [string]$FC, 64 | [string]$Loc, 65 | [bool]$SCUT = $false 66 | ) 67 | $featureExists = (Get-ItemProperty -Path "$customPath\Features" -Name $FN -ErrorAction SilentlyContinue) -ne $null 68 | if (-not $featureExists) { 69 | Write-Host "- Adding $FN -> $Loc" 70 | Set-ItemProperty -Path "$customPath\Features" -Name $FN -Value Yes 71 | $global:AF="yes" 72 | Start-Sleep -Milliseconds 100 73 | if ($SCUT) { 74 | Create-Shortcut -target $FC -shortcutName $FN -shortcutType "url" 75 | } else { 76 | Create-File -fileContent $FC -fileName $FN -fileDirectory $Loc 77 | } 78 | } 79 | } 80 | 81 | # 2+ Check for Shivaay Folder if not exist, restore it 82 | if (-not (Test-Path -Path "$optimizationPath")) { 83 | $optimizationPath = New-Item -Path "$shivaayPath\Optimizations" -ItemType Directory -Force 84 | $securityPath = New-Item -Path "$shivaayPath\Security" -ItemType Directory -Force 85 | $softwaresPath = New-Item -Path "$shivaayPath\Softwares" -ItemType Directory -Force 86 | $managementPath = New-Item -Path "$shivaayPath\System Management" -ItemType Directory -Force 87 | $interfacePath = New-Item -Path "$shivaayPath\User Interface" -ItemType Directory -Force 88 | Remove-Item -Path "HKLM:\Software\ShivaayOS\Features" -Recurse -Force | Out-Null 89 | 90 | Write-Host "" 91 | Write-Host "! Warning: The 'Shivaay' folder is missing or broken." -ForegroundColor Red 92 | Write-Host "- Restoring the 'Shivaay' folder to $shivaayPath..." -ForegroundColor Yellow 93 | Start-Sleep -Seconds 2 94 | 95 | # 2.1+ Create Shortcuts 96 | $winUtilCommand = "irm https://christitus.com/win | iex" 97 | Create-Shortcut -target $winUtilCommand -shortcutName 'WinUtil-CTT.lnk' 98 | $activatedCommand = "irm https://get.activated.win | iex" 99 | Create-Shortcut -target $activatedCommand -shortcutName 'Activate-Windows.lnk' 100 | $addFeatures = "irm https://github.com/ShivamXD6/Optimize-Windows/releases/latest/download/Add-More-Features.ps1 | iex" 101 | Create-Shortcut -target $addFeatures -shortcutName 'Add More Features.lnk' 102 | $updateOS = "irm https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/main/Updates.ps1 | iex" 103 | Create-Shortcut -target $updateOS -shortcutName 'Update.lnk' 104 | 105 | # Softwares 106 | # Game Bar 107 | $gameBar = "ms-windows-store://pdp/?productid=9nzkpstsnw4p" 108 | Create-Shortcut -target $gameBar -shortcutName 'XBOX GameBar.url' -shortcutType "url" 109 | 110 | # Microsoft Edge Browser 111 | $edgeBrowser = "iwr -Uri 'https://go.microsoft.com/fwlink/?linkid=2109047&Channel=Stable&language=en' -OutFile C:\Users\Public\Desktop\EdgeBrowser.exe" 112 | Create-Shortcut -target $edgeBrowser -shortcutName 'Edge Browser Installer.lnk' -shortcutPath $softwaresPath 113 | 114 | # Edge WebView 115 | $edgeWebview = "iwr -Uri 'https://go.microsoft.com/fwlink/p/?LinkId=2124703' -OutFile C:\Users\Public\Desktop\EdgeWebview.exe" 116 | Create-Shortcut -target $edgeWebview -shortcutName 'Edge WebView2 Runtime.lnk' -shortcutPath $softwaresPath 117 | 118 | # Google Chrome Browser 119 | $chrome = "iwr -Uri 'https://dl.google.com/chrome/install/latest/chrome_installer.exe' -OutFile C:\Users\Public\Desktop\Chrome.exe" 120 | Create-Shortcut -target $chrome -shortcutName 'Google Chrome Installer.lnk' -shortcutPath $softwaresPath 121 | 122 | # Brave Browser 123 | $brave = "iwr -Uri 'https://laptop-updates.brave.com/latest/winx64' -OutFile C:\Users\Public\Desktop\Brave.exe" 124 | Create-Shortcut -target $brave -shortcutName 'Brave Browser Installer.lnk' -shortcutPath $softwaresPath 125 | 126 | # Firefox Browser 127 | $firefox = "iwr -Uri 'https://download.mozilla.org/?product=firefox-latest-ssl&os=win&lang=en-US' -OutFile C:\Users\Public\Desktop\Firefox.exe" 128 | Create-Shortcut -target $firefox -shortcutName 'Mozilla Firefox Installer.lnk' -shortcutPath $softwaresPath 129 | 130 | # Zen Browser 131 | $zen = "iwr -Uri 'https://github.com/zen-browser/desktop/releases/latest/download/zen.installer.exe' -OutFile C:\Users\Public\Desktop\Zen.exe" 132 | Create-Shortcut -target $zen -shortcutName 'Zen Browser Installer.lnk' -shortcutPath $softwaresPath 133 | 134 | # Zeb Browser Portable 135 | $zenPort = "iwr -Uri 'https://github.com/zen-browser/desktop/releases/latest/download/zen.win-specific.zip' -OutFile C:\Users\Public\Desktop\ZenPortable.zip" 136 | Create-Shortcut -target $zenPort -shortcutName 'Zen Browser Portable.lnk' -shortcutPath $softwaresPath 137 | 138 | # Install/Uninstall Microsoft Store 139 | $MSStore = @' 140 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 141 | if %errorLevel% neq 0 ( 142 | echo Please Run as Administrator. 143 | pause & exit 144 | ) 145 | if "%~n0"=="Install Microsoft Store" ( 146 | call :INMS 147 | ) else ( 148 | call :UNMS 149 | ) 150 | 151 | :INMS 152 | PowerShell -ExecutionPolicy Bypass -Command "Get-AppxPackage -AllUsers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register \"$($_.InstallLocation)\AppXManifest.xml\"}" 153 | ren "%~dpnx0" "Uninstall - Microsoft Store.cmd" 154 | exit /b 155 | 156 | :UNMS 157 | PowerShell -ExecutionPolicy Bypass -Command "Get-AppxPackage -Allusers Microsoft.WindowsStore | Remove-AppxPackage" 158 | ren "%~dpnx0" "Install - Microsoft Store.cmd" 159 | exit /b 160 | '@ 161 | Create-File -fileContent $MSStore -fileName 'Uninstall - Microsoft Store.cmd' -fileDirectory $softwaresPath 162 | 163 | # Security 164 | # Toggle Defender 165 | $Defender = @" 166 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 167 | if %errorLevel% neq 0 ( 168 | echo Please Run as Administrator. 169 | pause & exit 170 | ) 171 | set reg1="HKLM\SYSTEM\CurrentControlSet\Services\Sense" 172 | set reg2="HKLM\SYSTEM\CurrentControlSet\Services\WdBoot" 173 | set reg3="HKLM\SYSTEM\CurrentControlSet\Services\WdFilter" 174 | set reg4="HKLM\SYSTEM\CurrentControlSet\Services\WdNisDrv" 175 | set reg5="HKLM\SYSTEM\CurrentControlSet\Services\WdNisSvc" 176 | set reg6="HKLM\SYSTEM\CurrentControlSet\Services\WinDefend" 177 | set reg7="HKLM\SYSTEM\CurrentControlSet\Services\MDCoreSvc" 178 | set reg8="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 179 | set reg9="HKCR\*\shellex\ContextMenuHandlers\EPP" 180 | set reg10="HKCR\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\InprocServer32" 181 | set reg11="HKCR\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\Version" 182 | set reg12="HKCR\Directory\shellex\ContextMenuHandlers\EPP" 183 | set reg13="HKCR\Drive\shellex\ContextMenuHandlers\EPP" 184 | set reg14="HKCR\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}" 185 | set reg15="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Virus and threat protection" 186 | set reg16="HKLM\SYSTEM\CurrentControlSet\Services\webthreatdefsvc" 187 | bcdedit | findstr /i "safeboot" 188 | if %ERRORLEVEL% EQU 0 ( 189 | if "%~n0"=="Enable - Defender" ( 190 | reg add %reg1% /v Start /t REG_DWORD /d 2 /f 191 | reg add %reg2% /v Start /t REG_DWORD /d 0 /f 192 | reg add %reg3% /v Start /t REG_DWORD /d 0 /f 193 | reg add %reg4% /v Start /t REG_DWORD /d 2 /f 194 | reg add %reg5% /v Start /t REG_DWORD /d 2 /f 195 | reg add %reg6% /v Start /t REG_DWORD /d 2 /f 196 | reg add %reg7% /v Start /t REG_DWORD /d 2 /f 197 | reg add %reg8% /v "SecurityHealth" /t REG_SZ /d "%windir%\system32\SecurityHealthSystray.exe" /f 198 | reg add %reg9% /ve /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f 199 | reg add %reg10% /ve /d "C:\\Program Files\\Windows Defender\\shellext.dll" /f 200 | reg add %reg10% /v "ThreadingModel" /d "Apartment" /f 201 | reg add %reg11% /ve /d "10.0.18362.1" /f 202 | reg add %reg12% /ve /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f 203 | reg add %reg13% /ve /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f 204 | reg delete %reg15% /v "UILockdown" /f 205 | reg add %reg16% /v Start /t REG_DWORD /d 2 /f 206 | ren "%~dpnx0" "Disable - Defender.cmd" 207 | ) else ( 208 | reg add %reg1% /v Start /t REG_DWORD /d 4 /f 209 | reg add %reg2% /v Start /t REG_DWORD /d 4 /f 210 | reg add %reg3% /v Start /t REG_DWORD /d 4 /f 211 | reg add %reg4% /v Start /t REG_DWORD /d 4 /f 212 | reg add %reg5% /v Start /t REG_DWORD /d 4 /f 213 | reg add %reg6% /v Start /t REG_DWORD /d 4 /f 214 | reg add %reg7% /v Start /t REG_DWORD /d 4 /f 215 | reg delete %reg8% /v "SecurityHealth" /f 216 | reg delete %reg9% /f 217 | reg delete %reg14% /f 218 | reg delete %reg12% /f 219 | reg delete %reg13% /f 220 | reg add %reg15% /v UILockdown /t REG_DWORD /d 1 /f 221 | reg add %reg16% /v Start /t REG_DWORD /d 4 /f 222 | ren "%~dpnx0" "Enable - Defender.cmd" 223 | ) 224 | bcdedit /deletevalue {current} safeboot 225 | reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "Shell" /t REG_SZ /d "explorer.exe" /f 226 | shutdown /r /f /t 1 227 | ) else ( 228 | bcdedit /set {current} safeboot minimal 229 | reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "Shell" /t REG_SZ /d "explorer.exe, cmd /c \"%~dpnx0\"" /f 230 | shutdown /r /f /t 1 231 | ) 232 | "@ 233 | Create-File -fileContent $Defender -fileName 'Enable - Defender.cmd' -fileDirectory $securityPath 234 | 235 | # Toggle Core Isolation 236 | $coreIsolation = @" 237 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 238 | if %errorLevel% neq 0 ( 239 | echo Please Run as Administrator. 240 | pause & exit 241 | ) 242 | set reg1="HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" 243 | set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Device security" 244 | set reg3="HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\KernelShadowStacks" 245 | set reg4="HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\CredentialGuard" 246 | set reg5="HKLM\SYSTEM\CurrentControlSet\Control\Lsa" 247 | set reg6="HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" 248 | 249 | if "%~n0"=="Enable - Core Isolation" ( 250 | reg add %reg1% /v Enabled /t REG_DWORD /d 1 /f 251 | reg delete %reg2% /v "UILockdown" /f 252 | reg add %reg3% /v Enabled /t REG_DWORD /d 1 /f 253 | reg add %reg4% /v Enabled /t REG_DWORD /d 1 /f 254 | reg add %reg5% /v RunAsPPL /t REG_DWORD /d 1 /f 255 | reg add %reg6% /v "EnableVirtualizationBasedSecurity" /t REG_DWORD /d 1 /f 256 | ren "%~dpnx0" "Disable - Core Isolation.cmd" 257 | ) else ( 258 | reg add %reg1% /v Enabled /t REG_DWORD /d 0 /f 259 | reg add %reg2% /v "UILockdown" /t REG_DWORD /d 1 /f 260 | reg add %reg3% /v Enabled /t REG_DWORD /d 0 /f 261 | reg add %reg4% /v Enabled /t REG_DWORD /d 0 /f 262 | reg add %reg5% /v RunAsPPL /t REG_DWORD /d 0 /f 263 | reg add %reg6% /v "EnableVirtualizationBasedSecurity" /t REG_DWORD /d 0 /f 264 | ren "%~dpnx0" "Enable - Core Isolation.cmd" 265 | ) 266 | "@ 267 | Create-File -fileContent $coreIsolation -fileName 'Disable - Core Isolation.cmd' -fileDirectory $securityPath 268 | 269 | # System Management 270 | # Toggle Hibernation and Fast Startup 271 | $hibernation = @" 272 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 273 | if %errorLevel% neq 0 ( 274 | echo Please Run as Administrator. 275 | pause & exit 276 | ) 277 | if "%~n0"=="Enable - Hibernation and Fast Startup" ( 278 | powercfg /hibernate on 279 | reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 1 /f 280 | ren "%~dpnx0" "Disable - Hibernation and Fast Startup.cmd" 281 | ) else ( 282 | powercfg /hibernate off 283 | ren "%~dpnx0" "Enable - Hibernation and Fast Startup.cmd" 284 | ) 285 | "@ 286 | Create-File -fileContent $hibernation -fileName 'Enable - Hibernation and Fast Startup.cmd' -fileDirectory $managementPath 287 | 288 | # Toggle Update Notifications 289 | $updateNotify = @" 290 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 291 | if %errorLevel% neq 0 ( 292 | echo Please Run as Administrator. 293 | pause & exit 294 | ) 295 | set reg1="HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" 296 | set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" 297 | if "%~n0"=="Enable - Update Notifications" ( 298 | reg delete %reg1% /v RestartNotificationsAllowed2 /f 299 | reg delete %reg2% /v SetAutoRestartNotificationDisable /f 300 | reg delete %reg2% /v SetUpdateNotificationLevel /f 301 | ren "%~dpnx0" "Disable - Update Notifications.cmd" 302 | ) else ( 303 | reg add %reg1% /v RestartNotificationsAllowed2 /t REG_DWORD /d 0 /f 304 | reg add %reg2% /v SetAutoRestartNotificationDisable /t REG_DWORD /d 1 /f 305 | reg add %reg2% /v SetUpdateNotificationLevel /t REG_DWORD /d 2 /f 306 | ren "%~dpnx0" "Enable - Update Notifications.cmd" 307 | ) 308 | "@ 309 | Create-File -fileContent $updateNotify -fileName 'Disable - Update Notifications.cmd' -fileDirectory $managementPath 310 | 311 | # Toggle Notifications and Background Apps 312 | $notification = @" 313 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 314 | if %errorLevel% neq 0 ( 315 | echo Please Run as Administrator. 316 | pause & exit 317 | ) 318 | set reg1="HKCU\Software\Policies\Microsoft\Windows\Explorer" 319 | set reg2="HKCU\Software\Microsoft\Windows\CurrentVersion\PushNotifications" 320 | set reg3="HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" 321 | if "%~n0"=="Enable - Notifications and Background Apps" ( 322 | reg add %reg1% /v DisableNotificationCenter /t REG_DWORD /d 0 /f 323 | reg add %reg2% /v ToastEnabled /t REG_DWORD /d 1 /f 324 | reg delete %reg3% /v LetAppsRunInBackground /f 325 | set st="Disable - Notifications and Background Apps.cmd" 326 | ) else ( 327 | reg add %reg1% /v DisableNotificationCenter /t REG_DWORD /d 1 /f 328 | reg add %reg2% /v ToastEnabled /t REG_DWORD /d 0 /f 329 | reg add %reg3% /v LetAppsRunInBackground /t REG_DWORD /d 2 /f 330 | set st="Enable - Notifications and Background Apps.cmd" 331 | ) 332 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 333 | "@ 334 | Create-File -fileContent $notification -fileName 'Enable - Notifications and Background Apps.cmd' -fileDirectory $managementPath 335 | 336 | # Optimizations 337 | # Cleanup 338 | $cleanup = @' 339 | # Kill Process, Ignore Errors and Continue 340 | $ErrorActionPreference = 'SilentlyContinue' 341 | Get-Process -Name cleanmgr -EA 0 | Stop-Process -Force -EA 0 342 | 343 | # Function to display sections 344 | function Show-Message ($message) { 345 | Write-Output "===========================================" 346 | Write-Output " $message" 347 | Write-Output "===========================================" 348 | Start-Sleep -Seconds 1 349 | } 350 | 351 | # Show initial disk space 352 | $initialFreeMB = (Get-PSDrive -Name C).Free / 1MB 353 | $initialFreeGB = [math]::Round($initialFreeMB / 1024, 2) 354 | 355 | Show-Message "Using Disk Cleanup with custom configuration" 356 | $volumeCache = @{ 357 | "Active Setup Temp Folders" = 2 358 | "BranchCache" = 2 359 | "Content Indexer Cleaner" = 2 360 | "Delivery Optimization Files" = 2 361 | "Device Driver Packages" = 2 362 | "Diagnostic Data Viewer database files" = 2 363 | "Downloaded Program Files" = 2 364 | "Feedback Hub Archive log files" = 2 365 | "Internet Cache Files" = 2 366 | "Language Pack" = 2 367 | "Offline Pages Files" = 2 368 | "Old ChkDsk Files" = 2 369 | "Recycle Bin" = 2 370 | "RetailDemo Offline Content" = 2 371 | "Setup Log Files" = 2 372 | "System error memory dump files" = 2 373 | "System error minidump files" = 2 374 | "Temporary Files" = 2 375 | "Temporary Setup Files" = 2 376 | "Temporary Sync Files" = 2 377 | "Update Cleanup" = 2 378 | "Upgrade Discarded Files" = 2 379 | "User file versions" = 2 380 | "Windows Defender" = 2 381 | "Windows Error Reporting Files" = 2 382 | "Windows ESD installation files" = 2 383 | "Windows Reset Log Files" = 2 384 | "Windows Upgrade Log Files" = 2 385 | } 386 | $registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches" 387 | foreach ($item in $volumeCache.GetEnumerator()) { 388 | $keyPath = Join-Path $registryPath $item.Key 389 | if (Test-Path $keyPath) { 390 | New-ItemProperty -Path $keyPath -Name StateFlags1337 -Value $item.Value -PropertyType DWord | Out-Null 391 | } 392 | } 393 | Start-Process -FilePath "$env:SystemRoot\system32\cleanmgr.exe" -ArgumentList "/sagerun:1337" -Wait:$false 394 | 395 | Show-Message "Cleaning up leftovers" 396 | $foldersToRemove = @( 397 | "C:\CbsTemp", 398 | "C:\Logs", 399 | "C:\Panther", 400 | "C:\Prefetch", 401 | "C:\ProgramData\Microsoft\Windows Defender\Scans", 402 | "C:\Program Files (x86)\Microsoft\EdgeUpdate\Download", 403 | "C:\SoftwareDistribution", 404 | "C:\System32\LogFiles", 405 | "C:\System32\LogFiles\WMI", 406 | "C:\System32\SleepStudy", 407 | "C:\System32\sru", 408 | "C:\System32\WDI\LogFiles", 409 | "C:\System32\winevt\Logs", 410 | "C:\SystemTemp", 411 | "C:\Temp" 412 | ) 413 | 414 | foreach ($folderPath in $foldersToRemove) { 415 | if (Test-Path $folderPath) { 416 | try { 417 | & takeown /F $folderPath /R /D Y *> $null 418 | & icacls $folderPath /grant Administrators:F /T *> $null 419 | Write-Output " - Deleted Files from Folder: $($folderPath)" 420 | Remove-Item -Path "$folderPath\*" -Force -Recurse 421 | } 422 | catch {} 423 | } 424 | } 425 | $fileTypes = @("C:\*.tmp", "C:\*.log", "C:\*.chk", "C:\*.old") 426 | foreach ($path in $fileTypes) { 427 | Get-ChildItem -Path $path -Recurse -Force | ForEach-Object { 428 | try { 429 | Remove-Item -Path $_.FullName -Force -Recurse 430 | Write-Output " - Deleted File: $($_.FullName)" 431 | } catch {} 432 | } 433 | } 434 | 435 | # Run DISM Component Cleanup 436 | Show-Message "Cleaning up WinSxS components" 437 | Dism /online /Cleanup-Image /StartComponentCleanup /ResetBase 438 | 439 | # Clean Empty Folders 440 | Show-Message "Cleaning Empty Folders" 441 | Get-ChildItem -Directory -Path "C:\" -Recurse | Where-Object { try { ($_.GetFiles().Count -eq 0) -and ($_.GetDirectories().Count -eq 0) } catch { $false } } | ForEach-Object { 442 | try { 443 | Remove-Item $_.FullName -Force -Recurse 444 | Write-Output " - Deleted Empty Folder: $($_.FullName)" 445 | } catch {} 446 | } 447 | 448 | # Clean System Restore Points 449 | Show-Message "Cleaning System Restore Points" 450 | vssadmin delete shadows /all /quiet | Out-Null 451 | 452 | # Show freed space 453 | $finalFreeMB = (Get-PSDrive -Name C).Free / 1MB 454 | $finalFreeGB = [math]::Round($finalFreeMB / 1024, 2) 455 | $freedSpaceMB = $finalFreeMB - $initialFreeMB 456 | $freedSpaceGB = [math]::Round($freedSpaceMB / 1024, 2) 457 | Show-Message "Before Cleanup: $initialFreeMB MB ($initialFreeGB GB) Free" 458 | Show-Message "After Cleanup: $finalFreeMB MB ($finalFreeGB GB) Free" 459 | Show-Message "Freed Space: $freedSpaceMB MB ($freedSpaceGB GB)" 460 | Pause 461 | '@ 462 | Create-File -fileContent $cleanup -fileName 'Cleanup.ps1' -fileDirectory $optimizationPath 463 | 464 | # Toggle Compact OS Mode 465 | $compactOS = @" 466 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 467 | if %errorLevel% neq 0 ( 468 | echo Please Run as Administrator. 469 | pause & exit 470 | ) 471 | if "%~n0"=="Enable - Compact OS" ( 472 | compact /CompactOS:always 473 | ren "%~dpnx0" "Disable - Compact OS.cmd" 474 | ) else ( 475 | compact /CompactOS:never 476 | ren "%~dpnx0" "Enable - Compact OS.cmd" 477 | ) 478 | "@ 479 | Create-File -fileContent $compactOS -fileName 'Enable - Compact OS.cmd' -fileDirectory $optimizationPath 480 | 481 | # Toggle GameDVR 482 | $gameDVR = @" 483 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 484 | if %errorLevel% neq 0 ( 485 | echo Please Run as Administrator. 486 | pause & exit 487 | ) 488 | set reg1="HKCU\System\GameConfigStore" 489 | set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows\GameDVR" 490 | if "%~n0"=="Enable - GameDVR" ( 491 | reg add %reg1% /v GameDVR_Enabled /t REG_DWORD /d 1 /f 492 | reg add %reg2% /v AllowGameDVR /t REG_DWORD /d 1 /f 493 | ren "%~dpnx0" "Disable - GameDVR.cmd" 494 | ) else ( 495 | reg delete %reg1% /v GameDVR_Enabled /f 496 | reg delete %reg2% /v AllowGameDVR /f 497 | ren "%~dpnx0" "Enable - GameDVR.cmd" 498 | ) 499 | "@ 500 | Create-File -fileContent $gameDVR -fileName 'Enable - GameDVR.cmd' -fileDirectory $optimizationPath 501 | 502 | # Toggle Search Indexing Service 503 | $searchIndex = @" 504 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 505 | if %errorLevel% neq 0 ( 506 | echo Please Run as Administrator. 507 | pause & exit 508 | ) 509 | if "%~n0"=="Enable - Search Indexing" ( 510 | sc config WSearch start=auto 511 | net start WSearch 512 | set st="Disable - Search Indexing.cmd" 513 | ) else ( 514 | net stop WSearch 515 | sc config WSearch start=disabled 516 | set st="Enable - Search Indexing.cmd" 517 | ) 518 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 519 | "@ 520 | Create-File -fileContent $searchIndex -fileName 'Enable - Search Indexing.cmd' -fileDirectory $optimizationPath 521 | 522 | # User Interface 523 | # Toggle Gallery and Home in File Explorer 524 | $gallery = @" 525 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 526 | if %errorLevel% neq 0 ( 527 | echo Please Run as Administrator. 528 | pause & exit 529 | ) 530 | set reg1="HKCU\Software\Classes\CLSID\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" 531 | set reg2="HKCU\Software\Classes\CLSID\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}" 532 | if "%~n0"=="Show - Gallery and Home In File Explorer" ( 533 | reg add %reg1% /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 1 /f 534 | reg add %reg2% /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 1 /f 535 | set st="Hide - Gallery and Home In File Explorer.cmd" 536 | ) else ( 537 | reg add %reg1% /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0 /f 538 | reg add %reg2% /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0 /f 539 | set st="Show - Gallery and Home In File Explorer.cmd" 540 | ) 541 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 542 | "@ 543 | Create-File -fileContent $gallery -fileName 'Show - Gallery and Home In File Explorer.cmd' -fileDirectory $interfacePath 544 | 545 | # Toggle Recent Items in Windows 546 | $recentItems = @" 547 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 548 | if %errorLevel% neq 0 ( 549 | echo Please Run as Administrator. 550 | pause & exit 551 | ) 552 | set reg1="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" 553 | set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" 554 | set reg3="HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" 555 | set reg4="HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" 556 | set reg5="HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" 557 | if "%~n0%"=="Disable - Recent Items" ( 558 | reg add %reg1% /v "NoStartMenuMFUprogramsList" /t REG_DWORD /d "1" /f 559 | reg add %reg1% /v "NoRecentDocsHistory" /t REG_DWORD /d "1" /f 560 | reg add %reg2% /v "ShowOrHideMostUsedApps" /t REG_DWORD /d "1" /f 561 | reg add %reg2% /v "HideRecentlyAddedApps" /t REG_DWORD /d "1" /f 562 | reg add %reg3% /v "NoInstrumentation" /t REG_DWORD /d "1" /f 563 | reg add %reg3% /v "ClearRecentDocsOnExit" /t REG_DWORD /d "1" /f 564 | reg add %reg3% /v "NoRecentDocsHistory" /t REG_DWORD /d "1" /f 565 | reg add %reg4% /v "NoRemoteDestinations" /t REG_DWORD /d "1" /f 566 | reg add %reg5% /v "Start_TrackProgs" /t REG_DWORD /d "0" /f 567 | reg add %reg5% /v "Start_TrackDocs" /t REG_DWORD /d "0" /f 568 | set st="Enable - Recent Items.cmd" 569 | ) else ( 570 | reg delete %reg1% /v "NoStartMenuMFUprogramsList" /f 571 | reg delete %reg1% /v "NoRecentDocsHistory" /f 572 | reg delete %reg2% /v "ShowOrHideMostUsedApps" /f 573 | reg delete %reg2% /v "HideRecentlyAddedApps" /f 574 | reg delete %reg3% /v "NoInstrumentation" /f 575 | reg delete %reg3% /v "ClearRecentDocsOnExit" /f 576 | reg delete %reg3% /v "NoRecentDocsHistory" /f 577 | reg delete %reg4% /v "NoRemoteDestinations" /f 578 | reg add %reg5% /v "Start_TrackProgs" /t REG_DWORD /d "1" /f 579 | reg add %reg5% /v "Start_TrackDocs" /t REG_DWORD /d "1" /f 580 | set st="Disable - Recent Items.cmd" 581 | ) 582 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 583 | "@ 584 | Create-File -fileContent $recentItems -fileName 'Enable - Recent Items.cmd' -fileDirectory $interfacePath 585 | 586 | Write-Host "- Successfully restored the 'Shivaay' folder!" -ForegroundColor Green 587 | Write-Host "" 588 | 589 | } 590 | if (-not (Test-Path "$customPath\Features")) { New-Item -Path "$customPath" -Name "Features" -Force | Out-Null } 591 | Write-Host "- Adding additional features..." -ForegroundColor Yellow 592 | Write-Host "- Script Version - V3" -ForegroundColor Blue 593 | Write-Host "" 594 | 595 | $contextMenus = New-Item -Path "$shivaayPath\Context Menu" -ItemType Directory -Force 596 | $usefulShortcuts = New-Item -Path "$shivaayPath\Shortcuts" -ItemType Directory -Force 597 | 598 | # 3+ Softwares 599 | # AMD Radeon 600 | $amdRadeon = "ms-windows-store://pdp/?productid=9nz1bjqn6bhl" 601 | Add-Fea -FC $amdRadeon -FN "AMD Radeon Software.url" -Loc $softwaresPath -SCUT $true 602 | 603 | # Realtek Audio Console 604 | $realtek = "ms-windows-store://pdp/?productid=9p2b8mcsvpln" 605 | Add-Fea -FC $realtek -FN "Realtek Audio Console.url" -Loc $softwaresPath -SCUT $true 606 | 607 | # Microsoft Tips 608 | $msTips = "ms-windows-store://pdp/?productid=9wzdncrdtbjj" 609 | Add-Fea -FC $msTips -FN "Microsoft Tips.url" -Loc $softwaresPath -SCUT $true 610 | 611 | # Memory Reduct 612 | $memReduct = "https://github.com/henrypp/memreduct" 613 | Add-Fea -FC $memReduct -FN "Memory Reduct.url" -Loc $softwaresPath -SCUT $true 614 | 615 | # Hi-Bit Uninstaller 616 | $hibitUninstaller = "https://hibitsoft.ir/" 617 | Add-Fea -FC $hibitUninstaller -FN "Hi-Bit Uninstaller.url" -Loc $softwaresPath -SCUT $true 618 | 619 | # 4+ Security 620 | # Show/Hide Unused Security Pages 621 | $unusedSecurityPages = @" 622 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 623 | if %errorLevel% neq 0 ( 624 | echo Please Run as Administrator. 625 | pause & exit 626 | ) 627 | set reg1="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Device performance and health" 628 | set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Family options" 629 | set reg3="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Account protection" 630 | if "%~n0"=="Hide - Unused Security Pages" ( 631 | reg add %reg1% /v "UILockdown" /t REG_DWORD /d 1 /f 632 | reg add %reg2% /v "UILockdown" /t REG_DWORD /d 1 /f 633 | reg add %reg3% /v "UILockdown" /t REG_DWORD /d 1 /f 634 | ren "%~dpnx0" "Show - Unused Security Pages.cmd" 635 | ) else ( 636 | reg delete %reg1% /v "UILockdown" /f 637 | reg delete %reg2% /v "UILockdown" /f 638 | reg delete %reg3% /v "UILockdown" /f 639 | ren "%~dpnx0" "Hide - Unused Security Pages.cmd" 640 | ) 641 | "@ 642 | Add-Fea -FC $unusedSecurityPages -FN "Show - Unused Security Pages.cmd" -Loc $securityPath 643 | 644 | # 5+ System Management 645 | # Toggle Printer Service 646 | $printer = @" 647 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 648 | if %errorLevel% neq 0 ( 649 | echo Please Run as Administrator. 650 | pause & exit 651 | ) 652 | if "%~n0"=="Enable - Printer Spooler" ( 653 | sc config Spooler start=auto 654 | net start Spooler 655 | ren "%~dpnx0" "Disable - Printer Spooler.cmd" 656 | ) else ( 657 | net stop Spooler 658 | sc config Spooler start=disabled 659 | ren "%~dpnx0" "Enable - Printer Spooler.cmd" 660 | ) 661 | "@ 662 | Add-Fea -FC $printer -FN "Enable - Printer Spooler.cmd" -Loc $managementPath 663 | 664 | # Toggle Biometric Service 665 | $biometric = @" 666 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 667 | if %errorLevel% neq 0 ( 668 | echo Please Run as Administrator. 669 | pause & exit 670 | ) 671 | if "%~n0"=="Enable - Biometric" ( 672 | sc config WbioSrvc start=auto 673 | net start WbioSrvc 674 | ren "%~dpnx0" "Disable - Biometric.cmd" 675 | ) else ( 676 | net stop WbioSrvc 677 | sc config WbioSrvc start=disabled 678 | ren "%~dpnx0" "Enable - Biometric.cmd" 679 | ) 680 | "@ 681 | Add-Fea -FC $biometric -FN "Enable - Biometric.cmd" -Loc $managementPath 682 | 683 | # Toggle Legacy Photo Viewer Association 684 | $photoViewer = @" 685 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 686 | if %errorLevel% neq 0 ( 687 | echo Please Run as Administrator. 688 | pause & exit 689 | ) 690 | set key="PhotoViewer.FileAssoc.Tiff" 691 | set reg="HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts" 692 | if "%~n0"=="Remove - Legacy Photo Viewer" ( 693 | reg delete "%reg%\.bmp\OpenWithProgids" /v %key% /f 694 | reg delete "%reg%\.cr2\OpenWithProgids" /v %key% /f 695 | reg delete "%reg%\.dib\OpenWithProgids" /v %key% /f 696 | reg delete "%reg%\.gif\OpenWithProgids" /v %key% /f 697 | reg delete "%reg%\.ico\OpenWithProgids" /v %key% /f 698 | reg delete "%reg%\.jfif\OpenWithProgids" /v %key% /f 699 | reg delete "%reg%\.jpe\OpenWithProgids" /v %key% /f 700 | reg delete "%reg%\.jpeg\OpenWithProgids" /v %key% /f 701 | reg delete "%reg%\.jpg\OpenWithProgids" /v %key% /f 702 | reg delete "%reg%\.jxr\OpenWithProgids" /v %key% /f 703 | reg delete "%reg%\.png\OpenWithProgids" /v %key% /f 704 | reg delete "%reg%\.tif\OpenWithProgids" /v %key% /f 705 | reg delete "%reg%\.tiff\OpenWithProgids" /v %key% /f 706 | reg delete "%reg%\.wdp\OpenWithProgids" /v %key% /f 707 | ren "%~dpnx0" "Restore - Legacy Photo Viewer.cmd" 708 | ) else ( 709 | reg add "%reg%\.bmp\OpenWithProgids" /v %key% /f 710 | reg add "%reg%\.cr2\OpenWithProgids" /v %key% /f 711 | reg add "%reg%\.dib\OpenWithProgids" /v %key% /f 712 | reg add "%reg%\.gif\OpenWithProgids" /v %key% /f 713 | reg add "%reg%\.ico\OpenWithProgids" /v %key% /f 714 | reg add "%reg%\.jfif\OpenWithProgids" /v %key% /f 715 | reg add "%reg%\.jpe\OpenWithProgids" /v %key% /f 716 | reg add "%reg%\.jpeg\OpenWithProgids" /v %key% /f 717 | reg add "%reg%\.jpg\OpenWithProgids" /v %key% /f 718 | reg add "%reg%\.jxr\OpenWithProgids" /v %key% /f 719 | reg add "%reg%\.png\OpenWithProgids" /v %key% /f 720 | reg add "%reg%\.tif\OpenWithProgids" /v %key% /f 721 | reg add "%reg%\.tiff\OpenWithProgids" /v %key% /f 722 | reg add "%reg%\.wdp\OpenWithProgids" /v %key% /f 723 | ren "%~dpnx0" "Remove - Legacy Photo Viewer.cmd" 724 | ) 725 | "@ 726 | Add-Fea -FC $photoViewer -FN "Restore - Legacy Photo Viewer.cmd" -Loc $managementPath 727 | 728 | # Configure Shivaay OS Settings 729 | $shivaayOS = @' 730 | # Set Console UI colors 731 | $CY = [System.ConsoleColor]::Cyan 732 | $GR = [System.ConsoleColor]::Green 733 | $YE = [System.ConsoleColor]::Yellow 734 | $MA = [System.ConsoleColor]::Magenta 735 | $WH = [System.ConsoleColor]::White 736 | $RE = [System.ConsoleColor]::Red 737 | 738 | # Define registry paths 739 | $registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" 740 | 741 | # Fetch information from registry for OS name and version 742 | $osName = (Get-ItemProperty -Path $registryPath -Name "Model").Model -replace " - V\d+\.\d+$", "" 743 | $osVersion = (Get-ItemProperty -Path $registryPath -Name "Model").Model -replace ".*- V", "V" 744 | 745 | # Fetch Shivaay Folder Path from registry or use default if not set 746 | $desktopPath = "C:\Users\Public\Desktop" 747 | $customPath = "HKLM:\Software\ShivaayOS" 748 | $shivaayPath = "$desktopPath\Shivaay" 749 | if (Test-Path $customPath) { 750 | try { 751 | $regValue = Get-ItemProperty -Path $customPath -Name "ShivaayFolderPath" -ErrorAction Stop 752 | $shivaayPath = $regValue."ShivaayFolderPath" 753 | } 754 | catch {} 755 | } 756 | 757 | # Default values for reset 758 | $defaultOSName = "ShivaayOS" 759 | $defaultShivaayFolder = "C:\Users\Public\Desktop\Shivaay" 760 | 761 | function Show-UI { 762 | Clear-Host 763 | Write-Host "==================================" -ForegroundColor $WH 764 | Write-Host " ShivaayOS Config " -ForegroundColor $CY 765 | Write-Host "==================================" -ForegroundColor $WH 766 | Write-Host 767 | Write-Host "Current OS Name : " -ForegroundColor $CY -NoNewline; Write-Host "$osName" -ForegroundColor $WH 768 | Write-Host "Current Version : " -ForegroundColor $GR -NoNewline; Write-Host "$osVersion" -ForegroundColor $WH 769 | Write-Host "Current Shivaay Folder: " -ForegroundColor $YE -NoNewline; Write-Host "$shivaayPath" -ForegroundColor $WH 770 | Write-Host 771 | Write-Host "==================================" -ForegroundColor $WH 772 | } 773 | 774 | function Update-Registry { 775 | param ( 776 | [string]$newOSName 777 | ) 778 | # Update the OS name without modifying version 779 | $newModel = "$newOSName - $osVersion" 780 | Set-ItemProperty -Path $registryPath -Name "Model" -Value $newModel 781 | $osName = $newOSName # Update variable for display 782 | Write-Host "OS Name updated to: $newOSName" -ForegroundColor $GR 783 | Show-UI # Refresh UI after update 784 | } 785 | 786 | function Update-ShivaayFolderInRegistry { 787 | param ( 788 | [string]$newShivaayFolder 789 | ) 790 | # Ensure the registry path exists 791 | if (-not (Test-Path $customPath)) { 792 | New-Item -Path $customPath -Force | Out-Null 793 | } 794 | # Update the Shivaay Folder path in the registry 795 | Set-ItemProperty -Path $customPath -Name "ShivaayFolderPath" -Value $newShivaayFolder 796 | $shivaayPath = $newShivaayFolder # Update variable for display 797 | Write-Host "Shivaay Folder Path updated to: $newShivaayFolder" -ForegroundColor $GR 798 | Show-UI # Refresh UI after update 799 | } 800 | 801 | function Reset-Settings { 802 | # Reset OS Name and Shivaay Folder to default values also resets reg values related to OS 803 | Update-Registry -newOSName $defaultOSName 804 | Update-ShivaayFolderInRegistry -newShivaayFolder $defaultShivaayFolder 805 | Remove-Item -Path "HKLM:\Software\ShivaayOS\Features" -Recurse -Force | Out-Null 806 | Write-Host "Settings have been reset to default values." -ForegroundColor $GR 807 | Show-UI # Refresh UI after reset 808 | } 809 | 810 | function Show-Menu { 811 | Write-Host "Choose an option:" -ForegroundColor $MA 812 | Write-Host "1. Change OS Name" -ForegroundColor $CY 813 | Write-Host "2. Change Shivaay Folder Path" -ForegroundColor $YE 814 | Write-Host "3. Reset Settings to Default" -ForegroundColor $RE 815 | Write-Host "4. Exit" -ForegroundColor $WH 816 | $choice = Read-Host "Enter your choice (1-4)" 817 | return $choice 818 | } 819 | 820 | function Get-UserInput { 821 | $exitFlag = $false 822 | while (-not $exitFlag) { 823 | $choice = Show-Menu 824 | switch ($choice) { 825 | 1 { 826 | Write-Host "Enter new OS Name:" -ForegroundColor $CY 827 | $newOSName = Read-Host 828 | if ($newOSName -ne "") { 829 | Update-Registry -newOSName $newOSName 830 | } else { 831 | Write-Host "OS Name not changed." -ForegroundColor $WH 832 | } 833 | } 834 | 2 { 835 | while ($true) { 836 | Write-Host "Enter new Shivaay Folder Path:" -ForegroundColor $YE 837 | $newShivaayFolder = Read-Host 838 | 839 | # Strip surrounding quotes if present 840 | $newShivaayFolder = $newShivaayFolder -replace '^"|"$', '' 841 | 842 | if ($newShivaayFolder -eq "") { 843 | Write-Host "Shivaay Folder Path not changed." -ForegroundColor $WH 844 | break 845 | } elseif (Test-Path -Path $newShivaayFolder -PathType Container) { 846 | Update-ShivaayFolderInRegistry -newShivaayFolder $newShivaayFolder 847 | break 848 | } else { 849 | Write-Host "Invalid directory path. Please enter a valid folder path." -ForegroundColor $RE 850 | } 851 | } 852 | } 853 | 3 { 854 | Reset-Settings 855 | } 856 | 4 { 857 | Write-Host "Exiting..." -ForegroundColor $GR 858 | $exitFlag = $true 859 | } 860 | Default { 861 | Write-Host "Invalid choice. Please select a valid option." -ForegroundColor $RE 862 | } 863 | } 864 | } 865 | } 866 | 867 | # Display UI and Prompt for input 868 | Show-UI 869 | Get-UserInput 870 | '@ 871 | Add-Fea -FC $shivaayOS -FN "Configure ShivaayOS.ps1" -Loc $managementPath 872 | 873 | # 6+ Optimizations 874 | # Toggle Last Access Time Stamp and 8.3 Char Length File Name Creation 875 | $timeChar = @" 876 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 877 | if %errorLevel% neq 0 ( 878 | echo Please Run as Administrator. 879 | pause & exit 880 | ) 881 | if "%~n0"=="Disable - Last Access Time and 8.3 Name" ( 882 | fsutil behavior set disableLastAccess 1 883 | fsutil behavior set disable8dot3 1 884 | ren "%~dpnx0" "Enable - Last Access Time and 8.3 Name.cmd" 885 | ) else ( 886 | fsutil behavior set disableLastAccess 0 887 | fsutil behavior set disable8dot3 0 888 | ren "%~dpnx0" "Disable - Last Access Time and 8.3 Name.cmd" 889 | ) 890 | "@ 891 | Add-Fea -FC $timeChar -FN "Enable - Last Access Time and 8.3 Name.cmd" -Loc $optimizationPath 892 | 893 | # Toggle Multi-Plane Overlay 894 | $MPO = @" 895 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 896 | if %errorLevel% neq 0 ( 897 | echo Please Run as Administrator. 898 | pause & exit 899 | ) 900 | set reg1="HKLM\SOFTWARE\Microsoft\Windows\Dwm" 901 | if "%~n0"=="Enable - Multi-Plane Overlay" ( 902 | reg delete %reg1% /v OverlayTestMode /f 903 | ren "%~dpnx0" "Disable - Multi-Plane Overlay.cmd" 904 | ) else ( 905 | reg add %reg1% /v OverlayTestMode /t REG_DWORD /d 5 /f 906 | ren "%~dpnx0" "Enable - Multi-Plane Overlay.cmd" 907 | ) 908 | "@ 909 | Add-Fea -FC $MPO -FN "Enable - Multi-Plane Overlay.cmd" -Loc $optimizationPath 910 | 911 | # Toggle SuperFetch 912 | $superFetch = @" 913 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 914 | if %errorLevel% neq 0 ( 915 | echo Please Run as Administrator. 916 | pause & exit 917 | ) 918 | if "%~n0"=="Enable - SuperFetch" ( 919 | sc config SysMain start=auto 920 | net start SysMain 921 | ren "%~dpnx0" "Disable - SuperFetch.cmd" 922 | ) else ( 923 | sc config SysMain start=disabled 924 | net stop SysMain 925 | ren "%~dpnx0" "Enable - SuperFetch.cmd" 926 | ) 927 | "@ 928 | Add-Fea -FC $superFetch -FN "Enable - SuperFetch.cmd" -Loc $optimizationPath 929 | 930 | # 7+ User Interface 931 | # Toggle Automatic Folder Discovery 932 | $automaticFolder = @" 933 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 934 | if %errorLevel% neq 0 ( 935 | echo Please Run as Administrator. 936 | pause & exit 937 | ) 938 | set reg1="HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell" 939 | if "%~n0"=="Enable - Automatic Folder Discovery" ( 940 | reg delete %reg1% /f 941 | ren "%~dpnx0" "Disable - Automatic Folder Discovery.cmd" 942 | ) else ( 943 | reg add %reg1% /v "FolderType" /t REG_SZ /d "NotSpecified" /f 944 | ren "%~dpnx0" "Enable - Automatic Folder Discovery.cmd" 945 | ) 946 | "@ 947 | Add-Fea -FC $automaticFolder -FN "Enable - Automatic Folder Discovery.cmd" -Loc $interfacePath 948 | 949 | # Toggle Network Navigation Pane in File Explorer 950 | $netNavigation = @" 951 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 952 | if %errorLevel% neq 0 ( 953 | echo Please Run as Administrator. 954 | pause & exit 955 | ) 956 | set reg1="HKCU\SOFTWARE\Classes\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" 957 | if "%~n0%"=="Show - Network Navigation In File Explorer" ( 958 | reg add %reg1% /v System.IsPinnedToNameSpaceTree /t REG_SZ /d 1 /f 959 | set st="Hide - Network Navigation In File Explorer.cmd" 960 | ) else ( 961 | reg add %reg1% /v System.IsPinnedToNameSpaceTree /t REG_SZ /d 0 /f 962 | set st="Show - Network Navigation In File Explorer.cmd" 963 | ) 964 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 965 | "@ 966 | Add-Fea -FC $netNavigation -FN "Show - Network Navigation In File Explorer.cmd" -Loc $interfacePath 967 | 968 | # Toggle Recycle Bin in File Explorer 969 | $recycleBin = @" 970 | @echo off 971 | reg query "HKU\S-1-5-19" >nul 2>&1 972 | if %errorLevel% neq 0 ( 973 | echo Please Run as Administrator. 974 | pause & exit 975 | ) 976 | set reg1="HKCU\Software\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}" 977 | if "%~n0%"=="Pin - Recycle Bin In File Explorer" ( 978 | reg add %reg1% /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 1 /f 979 | set st="Unpin - Recycle Bin In File Explorer.cmd" 980 | ) else ( 981 | reg add %reg1% /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0 /f 982 | set st="Pin - Recycle Bin In File Explorer.cmd" 983 | ) 984 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 985 | "@ 986 | Add-Fea -FC $recycleBin -FN "Unpin - Recycle Bin In File Explorer.cmd" -Loc $interfacePath 987 | 988 | # Toggle Removable Drives in File Explorer 989 | $rmvDrives = @" 990 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 991 | if %errorLevel% neq 0 ( 992 | echo Please Run as Administrator. 993 | pause & exit 994 | ) 995 | set reg1="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\DelegateFolders\{F5FB2C77-0E2F-4A16-A381-3E560C68BC83}" 996 | set reg2="HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\DelegateFolders\{F5FB2C77-0E2F-4A16-A381-3E560C68BC83}\{F5FB2C77-0E2F-4A16-A381-3E560C68BC83}" 997 | if "%~n0%"=="Show - Removable Drives In File Explorer Quick Access" ( 998 | reg add %reg1% /ve /d "Removable Drives" /f 999 | reg add %reg2% /ve /d "Removable Drives" /f 1000 | set st="Hide - Removable Drives In File Explorer Quick Access.cmd" 1001 | ) else ( 1002 | reg delete %reg1% /f 1003 | reg delete %reg2% /f 1004 | set st="Show - Removable Drives In File Explorer Quick Access.cmd" 1005 | ) 1006 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 1007 | "@ 1008 | Add-Fea -FC $rmvDrives -FN "Show - Removable Drives In File Explorer Quick Access.cmd" -Loc $interfacePath 1009 | 1010 | # Toggle Context Menu 1011 | $contextMenu = @" 1012 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 1013 | if %errorLevel% neq 0 ( 1014 | echo Please Run as Administrator. 1015 | pause & exit 1016 | ) 1017 | if "%~n0"=="Enable - New Context Menu" ( 1018 | reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f 1019 | set st="Enable - Old Context Menu.cmd" 1020 | ) else ( 1021 | reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f 1022 | set st="Enable - New Context Menu.cmd" 1023 | ) 1024 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 1025 | "@ 1026 | Add-Fea -FC $contextMenu -FN "Enable - New Context Menu.cmd" -Loc $interfacePath 1027 | 1028 | # 8+ Context Menu 1029 | # Get File Hash 1030 | $fileHash = @" 1031 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 1032 | if %errorLevel% neq 0 ( 1033 | echo Please Run as Administrator. 1034 | pause & exit 1035 | ) 1036 | if "%~n0"=="Add - Get File Hash" ( 1037 | reg add "HKCR\*\shell\GetFileHash" /v "MUIVerb" /t REG_SZ /d "Get File Hash" /f 1038 | reg add "HKCR\*\shell\GetFileHash" /v "SubCommands" /t REG_SZ /d "" /f 1039 | reg add "HKCR\*\shell\GetFileHash\shell\01SHA1" /v "MUIVerb" /t REG_SZ /d "SHA1" /f 1040 | reg add "HKCR\*\shell\GetFileHash\shell\01SHA1\command" /ve /t REG_SZ /d "powershell.exe -noexit get-filehash -literalpath '%%1' -algorithm SHA1 | format-list" /f 1041 | reg add "HKCR\*\shell\GetFileHash\shell\02SHA256" /v "MUIVerb" /t REG_SZ /d "SHA256" /f 1042 | reg add "HKCR\*\shell\GetFileHash\shell\02SHA256\command" /ve /t REG_SZ /d "powershell.exe -noexit get-filehash -literalpath '%%1' -algorithm SHA256 | format-list" /f 1043 | reg add "HKCR\*\shell\GetFileHash\shell\03SHA384" /v "MUIVerb" /t REG_SZ /d "SHA384" /f 1044 | reg add "HKCR\*\shell\GetFileHash\shell\03SHA384\command" /ve /t REG_SZ /d "powershell.exe -noexit get-filehash -literalpath '%%1' -algorithm SHA384 | format-list" /f 1045 | reg add "HKCR\*\shell\GetFileHash\shell\04SHA512" /v "MUIVerb" /t REG_SZ /d "SHA512" /f 1046 | reg add "HKCR\*\shell\GetFileHash\shell\04SHA512\command" /ve /t REG_SZ /d "powershell.exe -noexit get-filehash -literalpath '%%1' -algorithm SHA512 | format-list" /f 1047 | reg add "HKCR\*\shell\GetFileHash\shell\05MACTripleDES" /v "MUIVerb" /t REG_SZ /d "MACTripleDES" /f 1048 | reg add "HKCR\*\shell\GetFileHash\shell\05MACTripleDES\command" /ve /t REG_SZ /d "powershell.exe -noexit get-filehash -literalpath '%%1' -algorithm MACTripleDES | format-list" /f 1049 | reg add "HKCR\*\shell\GetFileHash\shell\06MD5" /v "MUIVerb" /t REG_SZ /d "MD5" /f 1050 | reg add "HKCR\*\shell\GetFileHash\shell\06MD5\command" /ve /t REG_SZ /d "powershell.exe -noexit get-filehash -literalpath '%%1' -algorithm MD5 | format-list" /f 1051 | reg add "HKCR\*\shell\GetFileHash\shell\07RIPEMD160" /v "MUIVerb" /t REG_SZ /d "RIPEMD160" /f 1052 | reg add "HKCR\*\shell\GetFileHash\shell\07RIPEMD160\command" /ve /t REG_SZ /d "powershell.exe -noexit get-filehash -literalpath '%%1' -algorithm RIPEMD160 | format-list" /f 1053 | ren "%~dpnx0" "Remove - Get File Hash.cmd" 1054 | ) else ( 1055 | reg delete "HKCR\*\shell\GetFileHash" /f 1056 | ren "%~dpnx0" "Add - Get File Hash.cmd" 1057 | ) 1058 | "@ 1059 | Add-Fea -FC $fileHash -FN "Add - Get File Hash.cmd" -Loc $contextMenus 1060 | 1061 | # Select Power Plan 1062 | $powerPlan = @" 1063 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 1064 | if %errorLevel% neq 0 ( 1065 | echo Please Run as Administrator. 1066 | pause & exit 1067 | ) 1068 | if "%~n0"=="Add - Select Power Plan" ( 1069 | reg add "HKCR\DesktopBackground\Shell\PowerPlan" /v "Icon" /t REG_SZ /d "powercpl.dll" /f 1070 | reg add "HKCR\DesktopBackground\Shell\PowerPlan" /v "MUIVerb" /t REG_SZ /d "Select Performance Mode" /f 1071 | reg add "HKCR\DesktopBackground\Shell\PowerPlan" /v "Position" /t REG_SZ /d "Middle" /f 1072 | reg add "HKCR\DesktopBackground\Shell\PowerPlan" /v "SubCommands" /t REG_SZ /d "" /f 1073 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\01menu" /v "MUIVerb" /t REG_SZ /d "Eco Mode" /f 1074 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\01menu" /v "Icon" /t REG_SZ /d "powercpl.dll" /f 1075 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\01menu\command" /ve /t REG_SZ /d "powercfg.exe /setactive a1841308-3541-4fab-bc81-f71556f20b4a" /f 1076 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\02menu" /v "MUIVerb" /t REG_SZ /d "Adaptive Mode" /f 1077 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\02menu" /v "Icon" /t REG_SZ /d "powercpl.dll" /f 1078 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\02menu\command" /ve /t REG_SZ /d "powercfg.exe /setactive 381b4222-f694-41f0-9685-ff5bb260df2e" /f 1079 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\03menu" /v "MUIVerb" /t REG_SZ /d "Turbo Mode" /f 1080 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\03menu" /v "Icon" /t REG_SZ /d "powercpl.dll" /f 1081 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\03menu\command" /ve /t REG_SZ /d "powercfg.exe /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" /f 1082 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\04menu" /v "MUIVerb" /t REG_SZ /d "Shivaay - Power Within" /f 1083 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\04menu" /v "Icon" /t REG_SZ /d "powercpl.dll" /f 1084 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\04menu\command" /ve /t REG_SZ /d "powercfg.exe /setactive 3ff9831b-6f80-4830-8178-736cd4229e7b" /f 1085 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\05menu" /v "MUIVerb" /t REG_SZ /d "Open Power Options" /f 1086 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\05menu" /v "Icon" /t REG_SZ /d "powercpl.dll" /f 1087 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\05menu" /v "CommandFlags" /t REG_DWORD /d 32 /f 1088 | reg add "HKCR\DesktopBackground\Shell\PowerPlan\shell\05menu\command" /ve /t REG_SZ /d "control.exe powercfg.cpl" /f 1089 | ren "%~dpnx0" "Remove - Select Power Plan.cmd" 1090 | ) else ( 1091 | reg delete "HKCR\DesktopBackground\Shell\PowerPlan" /f 1092 | ren "%~dpnx0" "Add - Select Power Plan.cmd" 1093 | ) 1094 | "@ 1095 | Add-Fea -FC $powerPlan -FN "Add - Select Power Plan.cmd" -Loc $contextMenus 1096 | 1097 | # 9+ Useful Shortcuts 1098 | # God Mode 1099 | $godMode = @" 1100 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 1101 | if %errorLevel% neq 0 ( 1102 | echo Please Run as Administrator. 1103 | pause & exit 1104 | ) 1105 | explorer shell:::{ED7BA470-8E54-465E-825C-99712043E01C} 1106 | "@ 1107 | Add-Fea -FC $godMode -FN "Open - God Mode.cmd" -Loc $usefulShortcuts 1108 | 1109 | # Startup Programs 1110 | $startPro = @" 1111 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 1112 | if %errorLevel% neq 0 ( 1113 | echo Please Run as Administrator. 1114 | pause & exit 1115 | ) 1116 | explorer shell:startup 1117 | "@ 1118 | Add-Fea -FC $startPro -FN "Open - Startup Programs.cmd" -Loc $usefulShortcuts 1119 | 1120 | # Apps Data 1121 | $appData = @" 1122 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 1123 | if %errorLevel% neq 0 ( 1124 | echo Please Run as Administrator. 1125 | pause & exit 1126 | ) 1127 | explorer %appdata% 1128 | timeout /t 3 1129 | explorer %localappdata% 1130 | "@ 1131 | Add-Fea -FC $appData -FN "Open - Apps Data.cmd" -Loc $usefulShortcuts 1132 | 1133 | # Reboot to BIOS Settings 1134 | $rebootBios = @" 1135 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 1136 | if %errorLevel% neq 0 ( 1137 | echo Please Run as Administrator. 1138 | pause & exit 1139 | ) 1140 | shutdown /r /fw /f /t 5 /c "Rebooting PC into BIOS Settings in 5 Seconds" 1141 | "@ 1142 | Add-Fea -FC $rebootBios -FN "Reboot to - BIOS Settings.cmd" -Loc $usefulShortcuts 1143 | 1144 | # Reboot to Normal or Safemode 1145 | $rebootSmode = @" 1146 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 1147 | if %errorLevel% neq 0 ( 1148 | echo Please Run as Administrator. 1149 | pause & exit 1150 | ) 1151 | if "%~n0"=="Reboot to - Safe Mode" ( 1152 | bcdedit /set {current} safeboot minimal 1153 | shutdown /r /f /t 5 /c "PC will restart into Safemode in 5 seconds" 1154 | ren "%~dpnx0" "Reboot to - Normal Mode.cmd" 1155 | ) else ( 1156 | bcdedit /deletevalue {current} safeboot 1157 | shutdown /r /f /t 5 /c "PC will restart into Normal mode in 5 seconds" 1158 | ren "%~dpnx0" "Reboot to - Safe Mode.cmd" 1159 | ) 1160 | "@ 1161 | Add-Fea -FC $rebootSmode -FN "Reboot to - Safe Mode.cmd" -Loc $usefulShortcuts 1162 | 1163 | Write-Host "" 1164 | if ($AF -eq "yes") { Write-Host "- All additional features have been successfully added!" -ForegroundColor Green } else { Write-Host "! Additional features are already added, please try again later" -ForegroundColor Red } 1165 | 1166 | pause -------------------------------------------------------------------------------- /CHANGELOGS.md: -------------------------------------------------------------------------------- 1 | # Changelogs - V4.4 2 | ## Answer File Changes 3 | - *Removed Pins and One Drive from the Start Menu (in Windows 10), also made some minor changes. 4 | - *Changed Locations of some files of the Shivaay folder. 5 | - Fixed Clipboard Delay (Thanks to Aftab for pointing out this issue) 6 | - *Not Restoring Legacy Photo Viewer by default. 7 | - *Using My Safemode approach to disable defender as it's a more efficient way. 8 | - *Disabled Core Isolation again by default as it reduces CPU performance by 5% (in my case). 9 | - *Removed additional commands for disabling various components, as the running folder scripts can handle it as well. 10 | - Removed BranchReadinessLevel policy registry looks like it doesn't do anything. 11 | - Removed Smart Screen script (I'll work on it later). 12 | 13 | ## Shivaay Folder Changes 14 | - Updated Cleanup Script (Fully Changed Cleaning methods and converted it into a Powershell script) 15 | - Updated Defender Script (To automatically reboot to normal mode after Toggling defender) 16 | - *Included Compact OS (as I use this on every Installation) 17 | 18 | ## Additional Features Script Changes 19 | - Added Script to Restore or Remove Legacy Photo Viewer in System Management. 20 | 21 | ## Update Script Changes 22 | - Included everything from above, except the ones with an asterisk (*) 23 | 24 | # Changelogs - V4.3 25 | ## Answer File Changes 26 | - Removed One registry for modifying OEM Info. 27 | - *Removed Logs Temporary. 28 | - Fixed Volume Mixer issue by not removing internet explorer compatibility. 29 | - Not Disabling Storage Sense by default as it's useful for freeing up space automatically. (I will configure its settings later). 30 | 31 | ## Shivaay Folder Changes 32 | - Using the Release channel for a more stable Add-More-Features script updates. 33 | 34 | ## Additional Features Script Changes 35 | - Added Script to configure OS Settings (like OS Name, and Shivaay Folder Location) in System Management. 36 | - Now if you want to change the Shivaay folder name just make another folder and enter the location of it in this Script. 37 | - Updated this script to V3, with improved logic, function and much more. 38 | 39 | ## Update Script Changes 40 | - Included everything from above, except the ones with an asterisk (*). 41 | - Using Variables and Functions in the main script instead using it for each script. 42 | - Updated Main Update Script to avoid replacing OS name or folder path. 43 | 44 | # Changelogs - V4.2 45 | ## Answer File Changes 46 | - Updated Pagefile Size, Min to 800MB and Max to 16GB to avoid Low Ram issues. 47 | - Not Removing Shortcut Icons as it Breaks inner icons of explorer. 48 | - Disable recall using dism too in non-Copilot+ PCs just after the user is created to avoid Explorer issues. 49 | - Disabled EdgeUpdate Scheduled Tasks. 50 | - Disabled Account Info for Privacy. 51 | - Removed User Based Registry for Tablet Mode as it's already Disabling System Wide. 52 | - Disable Copilot System Wide. 53 | - Adjust Priority for best Performance of Programs. 54 | - Using policy to disable windows error Reporting. 55 | - Enable hardware accelerated GPU Scheduling. 56 | - Disabling Background Apps System-Wide. 57 | - Enable old Nvidia Sharpening for better Visuals. 58 | - Removed Duplicate Registry. 59 | - Hide Home (Win 11) and 3D Objects (Win 10) 60 | - Not Disabling Defender and Core Isolation by default. (Although can be disable from Folder, not recommended disabling for a Normal User) 61 | 62 | ## Shivaay Folder Changes 63 | - Added Additional Features Script. 64 | - Added Update Script (Providing Updates for V4 and Above Versions) 65 | - Created a new toggle script for Smart Screen instead of managing by Defender. 66 | - From Shivaay Folder Software, Removed AMD Radeon Software, Realtek Audio Console, Microsoft Tips, Memory Reduct and Hibit Uninstaller. 67 | - From Shivaay Folder Security, Removed Unused Security Pages. 68 | - From Shivaay Folder System Management, Removed Compact OS, Printer Service, Biometric Service. 69 | - From Shivaay Folder Optimization, Removed Automatic Folder Discovery, Last access time and 8.3 Naming and MPO. 70 | - From Shivaay Folder User Interface, Removed Network Pane, Recycle Bin, Removable Drives and Context Menu. 71 | - Updated Script for Toggling background apps and notifications. 72 | 73 | ## Additional Features Script Changes 74 | - Initial Release for Additional Features Script. 75 | - Added Many new Scripts, with 2 new Folders (Context Menus, Shortcuts) 76 | 77 | ## Update Script Changes 78 | - Initial Release for Update Script. 79 | - Included Every possible updates. 80 | 81 | # Changelogs - V4.1 82 | ## Shivaay Folder Changes 83 | - Updated Core Isolation Script, to make sure it's disabling VBS. 84 | 85 | ## Answer File Changes 86 | - Disabled Aero Peek (Sometimes Irritating while Hovering mouse on taskbar icons) 87 | - Reduced Shutdown Command time from 10 to 5 seconds. 88 | - Hide Shortcut Icons on Desktop. 89 | - Added one more Registry to ensure disabling of VBS or Core Isolation. 90 | 91 | # Changelogs - V4 - Stable 92 | ## Shivaay Folder Changes 93 | - Using Function for Creation of Folder files. 94 | - Rewrite files name of Shivaay Folder for Improved Readability. 95 | - Added Cleanup Script in Optimization. 96 | - Added Biometric Script in System Management. 97 | - Added Memory Reduct in Software. 98 | - Updated Defender Script included webthreatdef service. 99 | - Added Script to Toggle Compact OS (Compress / Decompress Windows Binary Files) in System Management and save upto 2-3 GB. 100 | - Fixed Network Navigation Toggle in File Explorer. 101 | - Updated Core Isolation Script, added some more parts of core Isolation. 102 | - Updated Edge Webview link (No browser needed to download). 103 | - Added Some browsers, Chrome, Brave, Firefox, Zen (Normal and Portable) to directly download from Software. 104 | - Fixed Update Notifications Toggle. 105 | - Fixed Automatic Folder Discovery Script. 106 | 107 | ## Answer File Changes 108 | - Added Full Support for 24H2. 109 | - Dynamically adjust Virtual Memory as per requirement upto 8GB. 110 | - Removed Registry for `Managed by your Organization in Edge` (as there's no policies modification for edge). 111 | - Fixed Disabling of Delivery Optimization. 112 | - Reworked on Function may fix CTT shortcut flagging as Trojan by Defender. 113 | - Configure Visual Effects for Snappy Experience. 114 | - Added comments for shutdown commands. 115 | - Updated Power Plan Settings. 116 | - Reconfigure and Removed many Services and using function for all the services. 117 | - Disabled UAC as it's irritating sometimes. (legacy smart screen works best) 118 | - Determine Win 10 or 11 then start executing some commands to avoid any issues. 119 | - Removed duplicate comments and rewrite comments. 120 | - Removed Bypass NRO Online Account Creation Registry. 121 | - Removed some duplicate or useless Registries thanks to Nikki. 122 | - Removed Edge Webview from Installed apps list. 123 | - Removed Edge from Default Apps. 124 | - Added 'Compress to' in the old context menu even in 23H2, Thanks to ThioJoe. 125 | - Disabled Malicious Software Removal Tool From Installing via Windows Update. 126 | - Fixed Disabling of Automatic Folder Discovery and Toggle File of it. 127 | - Added `Run as Administrator` for PowerShell Script context menu. 128 | - Set SuperFetch to Manual to reduce initial Disk Usage, not worth it on SSD. 129 | - Disable Windows Input Experience and Widgets. 130 | - Removed Drivers Searching through Windows Update registry, as it's already enabled by Windows by default. 131 | - Removed Show Detailed BSOD, as it can be scary for some users. 132 | - Removed MouseHover registry as it's already set to 400. 133 | - Prevent Installation of Edge Browser with Windows update. 134 | - Removed Edge Scheduled tasks (tested and not getting installed by Windows Update) 135 | - Using Registry for disabling Defender Auto Sample Submission, cause Powershell gives error if defender gets disabled in Pre-installation stage 136 | - Changed Update branch from Current to Semi-Annual to receive more stable and tested updates. 137 | - Reduced duration for Features Updates to 6 Months, as Semi-Annual channel will get only stable updates so delaying it much longer doesn't make sense. 138 | - Reduced duration of security updates from 1 year to 7 days, because Security Updates can be delayed between 0-30 days. 139 | - Don't Download updates Automatically, Notify for Download and Installation of Updates and Manually install. 140 | - Removed Registry way to disable Teredo as already using command for that. 141 | - Removed some files to free up some space. 142 | - Do not Delete scheduled tasks as it can cause issues with Task Scheduler. 143 | 144 | # Shivaay - V3 145 | ## Shivaay Folder 146 | Software :- 147 | - Added Microsoft Store link for Following Apps 148 | + AMD Radeon Software 149 | + Microsoft Tips 150 | + Realtek Audio Console 151 | - Added Download Link for Following Apps 152 | + Edge Webview. 153 | + Hi-Bit Uninstaller. 154 | - Added Install/Uninstall Microsoft Store Script 155 | 156 | User Interface :- 157 | - Added a Toggle script to Pin/Unpin Recycle bin in file explorer. 158 | - Removed Script for Changing Default Folder Name. 159 | 160 | ## User Based Preferences 161 | - Enable item Check boxes in file explorer for quickly select files or folders. 162 | - Reverted Taskbar alignment to Center. 163 | - Removed Recycle Bin From Desktop. 164 | - Pin Recycle bin In File Explorer. 165 | 166 | ## Optimization and Improvements 167 | - Disabled Processor Performance Boost Mode by Default (To reduce temperature in some cases) 168 | - Optimized Script and Removed Unnecessary spaces from Scripts. 169 | - Using New Method to Toggle On or Off Windows Defender along with Smart Screen. 170 | - Using Variables to avoid repetition of reg paths in Shivaay Folder Scripts. 171 | - Disabled Storage Sense (You can enable it again from settings if you want) 172 | - To Improve Stability, Removed taking ownership of some C Drives Folders. 173 | - Removed FTH from Toggle option and Not Disabling it By Default (As some faced Crashing issues) 174 | - Reverted Enabling Hardware GPU Scheduling (Fixes random freeze) 175 | - Turn on NumLock after Windows Installation. 176 | - Enable Detailed BSOD by default. 177 | - Not changing Default Folder Name to Eternal Vault. 178 | - Change Script Shortcuts path under Shivaay Folder. 179 | - Removed Microsoft Store. 180 | - Miscellaneous Changes (I Forgot) 181 | 182 | # Shivaay - V2.1 183 | ## 1) User Based Customizations 184 | - Hide Gallery and Network Navigation From Quick Access (Clutter for those who don't use) 185 | - Disable Automatic File Discovery (Improves File Explorer Responsiveness) 186 | - Hide Removable Drives (This PC can show this Drives) 187 | 188 | ## 2) Disable Components/Services 189 | - Hibernation (Takes Excess space) 190 | - Set Printer Spooler to Manual (Not everyone uses Printer) 191 | - Disabled Search Indexing (Resource Intensive Process) 192 | - Fully Disabled Windows Defender (Including Core Isolation and Fault Tolerant Heap - For Performance Gain) and Hide Unused Components of Windows Security. 193 | - Added Processor Performance Boost Mode in Power Options. 194 | 195 | ## 3) Added Shivaay's Folder with Following 196 | ### Security - 197 | - Toggle Windows Defender 198 | - Toggle Core Isolation - Memory Integrity 199 | - Toggle Unused Security Pages 200 | - Toggle Fault Tolerant Heap (FTH) 201 | 202 | ### Softwares 203 | - Install Game Bar (Without the XBOX bloats) 204 | 205 | ### System Management - 206 | - Toggle Hibernation and Fast Startup 207 | - Toggle Printer Spooler 208 | - Toggle Notifications and Background Apps 209 | - Toggle Search Indexing 210 | - Toggle GameDVR 211 | 212 | ### Optimizations - 213 | - Toggle Update Notification (As Automatic Updates are Disabled) 214 | - Toggle Automatic File Discovery 215 | - Toggle 8.3 Char Name File Length Creation and Last Access Time Stamp. 216 | - Toggle Multi-Plane Overlay 217 | 218 | ### User Interface - 219 | - Toggle Gallery in explorer 220 | - Toggle Network Navigation Pane 221 | - Toggle Removable Drives in Sidebar 222 | - Toggle Windows 10/11 Context Menu 223 | - Change New Folder Name (Just Rename that file And Run) 224 | - Toggle Recent Items. 225 | 226 | ## 4) Fixed 227 | - Some Kernel Logging Services not Disabled 228 | - UAC Dimming Desktop for Account Control 229 | - Reserved Storage turning on again 230 | - Disable Irritating Windows Security Notification also Startup 231 | - Improved Windows Installation Speed by fixing Scripts Syntax errors and clearing unnecessary commands. 232 | - End User Task With Right Click. 233 | 234 | ## 5) Miscellaneous Changes 235 | - Added Shivaay - Power Within (For Ultimate Performance) 236 | - Show More Details on File Transfer 237 | - Turn on Game Mode and Hardware Accelerated GPU Scheduling 238 | - Displays Camera On/Off Notification For Privacy. 239 | - Disable Auto Start on BSOD, to take note of error code. 240 | - Enable Verbose Status Messages By Default. 241 | - Use Full App Name on Desktop Shortcuts (Like Firefox not Firefox - Shortcut) 242 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🔮 Optimize Windows 2 | [![Version](https://img.shields.io/badge/Version-V4.4%20-2D9F2D?style=for-the-badge&logo=github&logoColor=white)](https://github.com/ShivamXD6/Optimize-Windows/releases/latest) 3 | [![User Base](https://img.shields.io/github/downloads/ShivamXD6/Optimize-Windows/total?style=for-the-badge&logo=github&label=User%20Base&link=https%3A%2F%2Fgithub.com%2FShivamXD6%2FOptimize-Windows%2Freleases%2Flatest)](https://github.com/ShivamXD6/Optimize-Windows/releases/latest) 4 | [![License](https://img.shields.io/badge/License-GPL%20v3-0078D4?style=for-the-badge&logo=open-source-initiative&logoColor=white)](https://github.com/ShivamXD6/Optimize-Windows/blob/main/LICENSE) 5 | ![Last Updated](https://img.shields.io/github/last-commit/ShivamXD6/Optimize-Windows?style=for-the-badge&color=6A5ACD&label=Last%20Updated) 6 | [![Compatible](https://img.shields.io/badge/Compatible-Windows%2010%2F11-0078D4?style=for-the-badge&logo=appveyor&logoColor=white)]() 7 | [![Telegram](https://img.shields.io/badge/Chat-Telegram-0088CC?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/flaxcubegaming) 8 | [![Discord](https://img.shields.io/badge/Join-Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/gw3cRp6xBw) 9 | [![Contribute](https://img.shields.io/badge/Contribute-Start%20a%20PR-FF4500?style=for-the-badge&logo=github&logoColor=white)](https://github.com/ShivamXD6/Optimize-Windows/compare) 10 | 11 | - This repository contains an Answer File and Some Scripts designed to optimize and streamline your Windows installation, making it ideal for gaming, power users, and even low-end laptops or PCs. 🎮💻 12 | - For existing Windows and if you don't want to reinstall then it's recommended to use [WinUtil by CTT.](https://github.com/ChrisTitusTech/winutil) 13 | 14 | ## 📑 Table of Contents 15 | 16 | - [📂 Included Scripts](#-included-scripts) 17 | - [🚀 Features](#-features) 18 | - [❓ What to choose for installation](#-what-to-choose-for-installation) 19 | - [🔧 Installation with Ventoy](#-installation-with-ventoy) 20 | - [🔧 Installation with Rufus](#-installation-with-rufus) 21 | - [📸 Screenshots](#-screenshots) 22 | - [💖 Acknowledgements](#-acknowledgements) 23 | 24 | ## 📂 Included Scripts 25 | ### Auto Unattend or Answer File 26 | 27 | - Automates Windows installation with optimized settings, debloating or tweaking Windows etc. 28 | - Ideal for new setups or reinstalling Windows. 29 | 30 | ### Add More Features Script 31 | 32 | - Expands the Shivaay Folder with additional tweaks or customization options. 33 | - Perfect for enhancing personalization and system performance. 34 | 35 | ### Update Script 36 | 37 | - Fetches and applies the latest updates from the Optimize-Windows repository. 38 | - Keeps your system configurations and tweaks up to date effortlessly. 39 | 40 | ## 🚀 Features 41 | ### 1. **🚀 While Installation of Windows** 42 | - 🚧 Bypass Windows 11 Requirements 43 | - 🌐 Support for Local Account During Setup 44 | - 🗂️ Show All Available Windows Editions 45 | - 💾 Support Automatic Offline Driver Installation 46 | - ⚙️ Auto OOBE Setup 47 | - 🚀 Improve Windows Installation Speed 48 | 49 | ### 2. **💨 Debloat & Optimization** 50 | - 🧹 Remove Windows Bloatware 51 | - ❌ Disable Error Reporting and Remote Assistance 52 | - 🚀 Various Services Optimization 53 | - 🚫 Disable Automatic File Discovery 54 | - 🎮 Turn on Game Mode and Hardware GPU Acceleration 55 | - 💿 Dynamically Adjust Virtual Memory upto 16GB 56 | - 🌟 Configure Visual Effects for Snappy Experience 57 | - 🤖 Debloat Copilot and Disable Recall 58 | 59 | ### 3. **🔐 Privacy & Security** 60 | - 👁️ Disable Telemetry and Tracking 61 | - 🔔 Display Camera On/Off Notification 62 | - 🔒 Configure Windows Update: Security Updates by 7 Days and Features Updates by 6 Months, also don't download/install updates automatically. 63 | - 🔒 Prevent Installation of Dev Home, New Outlook, Chat, Bitlocker Auto-Encryption 64 | - 🔒 Disabled UAC (irritating for some users,although can be enabled manually later) 65 | 66 | ### 4. **👤 User-Based Customizations** 67 | - 📁 Hide Gallery and Network Navigation (In File Explorer) 68 | - 🔄 Hide Removable Drives (In File Explorer) 69 | - ✔️ Enable item Check boxes in file explorer to quickly select files or folders by mouse. 70 | - ♻️ Pin Recycle bin In File Explorer. 71 | - ⚙️ Hide Homepage(In Settings) 72 | - 🛡️Hide Unused Security Pages(In Windows Security) 73 | - 📊 Show More Details on File Transfer 74 | - 🖥️ Enable Verbose Status Messages 75 | - 🔤 Use Full App Name on Desktop Shortcuts 76 | - 🖇️Add 'Compress to' in Old Context Menu 77 | - 👮 Add 'Run as Administrator' for PowerShell scripts Context Menu 78 | 79 | ### 5. **🛑 Disable Components/Services** 80 | - 💤 Disable Hibernation and Reserved Storage 81 | - 🖨️ Disable Printer Spooler 82 | - 🔍 Disable Search Indexing 83 | - 🛡️ Disable Defender, Core Isolation and Smart Screen 84 | - 🔒 Disable Biometrics (Fingerprint and Face Unlock) 85 | - 📀 Set SysMain (SuperFetch/Prefetch) to Manual not required for many SSD Users 86 | 87 | ### 6. **📂 Shivaay's Folder Options** 88 | - Everything which have "*" are only available in Add More Features Script. Not available by default to make folder less cluttered. 89 | 90 | #### 🔐 **Security** 91 | - 🛡️ Toggle Windows Defender and Core Isolation 92 | - 🛡️ *Toggle Unused Security Pages 93 | 94 | #### 📦 **Software** 95 | - This are Links/Internet-Shortcuts to install them, doesn't included any of them by Default. 96 | - 🎮 Game Bar (Without Xbox Bloats) 97 | - 🔴 *AMD Radeon Software (Without Bloats, also not available in Microsoft Store search) 98 | - 💡 *Microsoft Tips (Fixes Safe Mode and Troubleshooting) 99 | - 🎧 *Realtek Audio Console (As it's not available in Microsoft search) 100 | - 🌐 Edge Webview (Some Apps Requires) 101 | - ♻️ *Hi-Bit Uninstaller (Free and good for fully uninstalling any app) 102 | - 📂 Microsoft Store (To uninstall/install it again) 103 | - 🌐 Various Browsers like Edge, Chrome, Firefox, Brave and Zen (Normal + Portable) 104 | - 💽 *Memory Reduct (Like sysinternals but Lightweight) 105 | 106 | #### 🛠️ **System Management** 107 | - 💤 Toggle Hibernation, Fast Startup 108 | - 🖨️ *Toggle Printer Spooler 109 | - 📵 Toggle Notifications and Background Apps 110 | - 🔍 Toggle Search Indexing 111 | - 🎥 Toggle GameDVR 112 | - 🔒 *Toggle Biometrics (Fingerprint and Face Unlock) 113 | - 📝 *Configure Shivaay OS (Like change OS name, Folder Location etc) 114 | 115 | #### ⚡ **Optimizations** 116 | - 🔔 Toggle Update Notification 117 | - 🔄 *Toggle Automatic Folder Discovery, 8.3 Char Name, Last Access Time, Multi-Plane Overlay 118 | - 🧹 Cleanup Script to clean unnecessary files and free up space 119 | - 💽 *Toggle Superfetch/Prefetch 120 | - ⏬ *Toggle Delivery Optimization 121 | - 💿 Toggle Compact OS (Free up space by compressing Windows Binaries) 122 | 123 | #### 🖥️ **User Interface** 124 | - 🖼️ Toggle Gallery and Home 125 | - 📁 *Toggle Network Pane and Removable Drives in File Explorer 126 | - ♻️ *Pin/Unpin Recycle bin in file explorer 127 | - 📜 Toggle Recent Items (Recent Apps, Recent Documents, Files etc) 128 | - 🔄 *Toggle Windows Old/New Context Menu 129 | 130 | #### 🎛️ ***Context Menu** 131 | - 🔑 Add/Remove Get File Hash 132 | - 🔋 Add/Remove Select Performance Mode 133 | 134 | #### 🚪 ***Useful Shortcuts** 135 | - 🗄️ Open God Mode 136 | - 🏁 Open Startup Programs 137 | - 📀 Open Apps Data 138 | - 🔁 Restart to Bios Settings, Safe mode or Normal Mode 139 | 140 | ### 7. **🔄 Miscellaneous** 141 | - 🖥️ Create Internet Shortcuts in Shivaay Folder of CTT Winutil, Activate Windows, Add more features and Update Script. 142 | - ⚡ Added a Custom Power Plan (Shivaay - Power Within) 143 | - 🛑 Disable Auto Restart on BSOD (To Capture Detailed Logs) 144 | 145 | ## ❓ What to choose for installation? 146 | > [!TIP] 147 | > **Ventoy** is recommended for users who don't frequently format their USB drives or want to include drivers during installation. 148 | > **Rufus**, on the other hand, is ideal for those who prefer a quick and simple installation and don't mind formatting the drive and installing drivers afterward. 149 | 150 | ## 🔧 Installation with Ventoy 151 | 152 | ### 1. Prepare Your USB Drive 153 | 1. Create a bootable USB drive using [Ventoy](https://ventoy.net/). 154 | 2. Download the [Optimize-Windows.zip](https://github.com/ShivamXD6/Optimize-Windows/releases/latest/download/Optimize-Windows.zip). 155 | 3. Extract the contents of `Optimize-Windows.zip` into your USB drive. 156 | 4. Confirm that the file structure on your USB drive matches the following: 157 | 158 | ```plaintext 159 | D: (Your USB-Drive) 160 | │ 161 | ├───$WinpeDriver$ 162 | │ └───Add or Export Your Drivers Here 163 | │ 164 | ├───ventoy 165 | │ │───ventoy.json 166 | │ └───autounattend.xml 167 | │ 168 | └───WinISO 169 | └───Add Your Windows ISO Here 170 | ``` 171 | 172 | 5. Add your Windows ISO into WinISO, then Move on to Next Section. 173 | 174 | > [!NOTE] 175 | > Only Official Windows 10/11 ISO are supported. 176 | 177 | ### 2. Optional: Adding Drivers 178 | 1. Create a folder named `Drivers` on your C: drive. 179 | 2. Backup your current Windows drivers to the C: drive by running the command in command prompt as administrator: 180 | 181 | ```cmd 182 | dism /online /export-driver /destination:C:\Drivers 183 | ``` 184 | 185 | 3. Plug your USB drive/installation media into your computer. 186 | 4. Copy the drivers you want to automatically install from `C:\Drivers` to `D:\$WinpeDriver$`. 187 | 188 | > [!NOTE] 189 | > Drivers should be placed in their respective subfolders with `.inf` files included. `.exe` driver files are not supported. 190 | 191 | ### 3. Installing Windows via Ventoy 192 | > [!TIP] 193 | > Don't connect to internet or lan cable while installing. 194 | 195 | 1. Now Restart into Boot Selection Menu (By Pressing F12, F9, or ESC Repeatedly). 196 | 2. Select your USB Drive. 197 | 3. If it Says "Verification Failed: (0x1A) Security Violation" Then, Follow this, or Simply Disable secure boot from BIOS:- 198 | 199 | ![Ventoy Enroll Key](https://www.ventoy.net/static/img/secure_key.gif) 200 | 201 | 4. Now Select `Boot in Normal Mode`. 202 | 5. Now you'll see some commands running. 203 | 6. Select Your Language, Region and Select Windows Pro Version. 204 | 205 | > [!NOTE] 206 | > If you don't see many Windows versions, click **Back** once, then click **Next** again. This should display all available Windows versions. 207 | 208 | 7. You'll be Redirected to Custom Installation. Now Do any one method according to your condition. 209 | 210 | - If you want to keep your data :- Just select partition where your windows is installed and click next. Don't delete any other partition. 211 | 212 | - If you want to Clean Install :- Delete all partitions. Then select Unallocated Space and click Next. 213 | 214 | > [!NOTE] 215 | > If installation failed it's recommended to use Rufus method given below. As 24H2 having new setup issues with Ventoy. 216 | 217 | 8. Proceeed Installation as usual windows Installation. 218 | 9. Now windows will run some more commands and restart. 219 | 10. Done Enjoy :) 220 | 221 | ## 🔧 Installation with Rufus 222 | 223 | ### 1. Prepare Your USB Drive 224 | 1. Create a bootable USB drive using [Rufus](https://rufus.ie). 225 | 226 | > [!IMPORTANT] 227 | > Don't tick any options while making bootable drive 228 | > ![Rufus Answer File](./Screenshots/RF-XML.png) 229 | 230 | 2. Download the [autounattend.xml](https://github.com/ShivamXD6/Optimize-Windows/releases/latest/download/autounattend.xml). 231 | 3. Now you have two ways:- 232 | 233 | #### Short way (Recommended if you're directly installing it on Main Machine) 234 | 1. Move the downloaded `autounattend.xml` to your Rufus USB drive (the one containing `setup.exe`) 235 | 236 | #### Long way (Recommended Only if you want to test it out on VM) 237 | 1. Download [AnyBurn](https://anyburn.com/download.php). 238 | 2. Open and click on `Edit Image` 239 | 3. Select Windows ISO. 240 | 4. Click on `Add` at Top Left Corner. 241 | 5. Select `autounattend.xml` 242 | 6. Click Next, and Modify name to something else to keep original ISO Untouched. 243 | 7. Done, now test it on VM or Directly Use it on Rufus. 244 | 245 | > [!NOTE] 246 | > Only Official Windows 10/11 ISO are supported. 247 | 248 | ### 2. Installing Windows via Rufus 249 | > [!TIP] 250 | > Don't connect to internet or lan cable while installing. 251 | 252 | 1. Now Restart into Boot Selection Menu (By Pressing F12, F9, or ESC Repeatedly). 253 | 2. Select your USB Drive. 254 | 3. Now you'll see some commands running. 255 | 4. Select Your Language, Region and Select Windows Pro Version. 256 | 257 | > [!NOTE] 258 | > If you don't see many Windows versions, click **Back** once, then click **Next** again. This should display all available Windows versions. 259 | 260 | 7. You'll be Redirected to Custom Installation. Now Do any one method according to your condition. 261 | 262 | - If you want to keep your data :- Just select partition where your windows is installed and click next. Don't delete any other partition. 263 | 264 | - If you want to Clean Install :- Delete all partitions. Then select Unallocated Space and click Next. 265 | 266 | 8. Proceeed Installation as usual windows Installation. 267 | 9. Now windows will run some more commands and restart. 268 | 10. Done Enjoy :) 269 | 270 | ## 📸 Screenshots 271 | 272 | ### 🧪 Benchmarks 273 | 274 | - On Original Windows 275 | 276 | ![BenchMark-OG](./Screenshots/ORG-BM.png) 277 | 278 | - On Windows with Answer File 279 | 280 | ![BenchMark-AF](./Screenshots/AF-BM.png) 281 | 282 | ### 💻 Process Count, RAM, Installed Apps and Storage Usage 283 | 284 | - On Original Windows 285 | 286 | ![TaskManager-OG](./Screenshots/ORG-TM.png) 287 | 288 | - On Windows with Answer File 289 | 290 | ![TaskManager-AF](./Screenshots/AF-TM.png) 291 | 292 | ![InstalledApps-AF](./Screenshots/AF-IA.png) 293 | 294 | ![Storage-AF](./Screenshots/AF-ST.png) 295 | 296 | > [!NOTE] 297 | > These have been tested on a VM (VirtualBox), not on the main machine; therefore, the results may be slightly different on the main machine. 298 | 299 | ### 🖥️ Desktop & Shivaay Folder 300 | 301 | - On Original Windows 302 | 303 | ![Desktop-OG](./Screenshots/ORG-D.png) 304 | 305 | - On Windows with Answer File 306 | 307 | ![Desktop-AF](./Screenshots/AF-DE.png) 308 | 309 | ![Shivaay-Folder-AF](./Screenshots/AF-EX.png) 310 | 311 | ![Optimizations-Folder](./Screenshots/AF-EXOP.png) 312 | 313 | ![Security-Folder](./Screenshots/AF-EXSE.png) 314 | 315 | ![Softwares-Folder](./Screenshots/AF-EXSO.png) 316 | 317 | ![Management-Folder](./Screenshots/AF-EXSM.png) 318 | 319 | ![UI-Folder](./Screenshots/AF-EXUI.png) 320 | 321 | ## 💖 Acknowledgements 322 | - Thanks to [MemTechTips](https://github.com/memstechtips/UnattendedWinstall) for Core file Used as a base for Answer File. 323 | - Credits to [Atlas](https://atlasos.net), [ChrisTitusTech](https://github.com/ChrisTitusTech/winutil) and [Revi](https://revi.cc) for Tweaks used in this answer File. 324 | -------------------------------------------------------------------------------- /Screenshots/AF-BM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-BM.png -------------------------------------------------------------------------------- /Screenshots/AF-DE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-DE.png -------------------------------------------------------------------------------- /Screenshots/AF-EX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-EX.png -------------------------------------------------------------------------------- /Screenshots/AF-EXOP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-EXOP.png -------------------------------------------------------------------------------- /Screenshots/AF-EXSE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-EXSE.png -------------------------------------------------------------------------------- /Screenshots/AF-EXSM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-EXSM.png -------------------------------------------------------------------------------- /Screenshots/AF-EXSO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-EXSO.png -------------------------------------------------------------------------------- /Screenshots/AF-EXUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-EXUI.png -------------------------------------------------------------------------------- /Screenshots/AF-IA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-IA.png -------------------------------------------------------------------------------- /Screenshots/AF-ST.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-ST.png -------------------------------------------------------------------------------- /Screenshots/AF-TM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/AF-TM.png -------------------------------------------------------------------------------- /Screenshots/ORG-BM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/ORG-BM.png -------------------------------------------------------------------------------- /Screenshots/ORG-D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/ORG-D.png -------------------------------------------------------------------------------- /Screenshots/ORG-TM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/ORG-TM.png -------------------------------------------------------------------------------- /Screenshots/RF-XML.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/Screenshots/RF-XML.png -------------------------------------------------------------------------------- /Updates.ps1: -------------------------------------------------------------------------------- 1 | # Function to get the current version from the OEM information 2 | function Get-CurrentVersion { 3 | $oemInfo = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" 4 | 5 | # Extract the model name and version using regex 6 | if ($oemInfo.Model -match "(.*) - V(\d+(\.\d+)?)") { 7 | $modelName = $matches[1] # The part before " - V" 8 | $version = $matches[2] # The version after "V" 9 | return @{ ModelName = $modelName; Version = $version } 10 | } 11 | return @{ ModelName = "Unknown"; Version = "0.0" } # Default if no match is found 12 | } 13 | 14 | # Function to update OEM information 15 | function Update-OEMInfo { 16 | param ( 17 | [string]$newVersion, 18 | [string]$modelName 19 | ) 20 | # Update the model string with the new version but keep the model name 21 | $newModelString = "$modelName - V$newVersion" 22 | reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" /v "Model" /t REG_SZ /d $newModelString /f 23 | Write-Host "" 24 | Write-Host "Updated to $newModelString." -ForegroundColor Green 25 | Write-Host "" 26 | Write-Host "Press Enter to Check for more updates..." -ForegroundColor Cyan 27 | Write-Host "" 28 | } 29 | 30 | # Function to display a decorated header 31 | function Show-Header { 32 | param ( 33 | [string]$title 34 | ) 35 | Clear-Host 36 | $header = @" 37 | ========================================================== 38 | $title 39 | ========================================================== 40 | "@ 41 | Write-Host $header -ForegroundColor Cyan 42 | } 43 | 44 | # Function to fetch releases 45 | function Fetch-Releases { 46 | try { 47 | $response = irm -Uri $apiUrl -Method Get -Headers @{ "User-Agent" = "PowerShell" } 48 | return $response 49 | } catch { 50 | Write-Host "Failed to fetch releases. Please check your internet connection." -ForegroundColor Red 51 | exit 52 | } 53 | } 54 | 55 | # Function to display changelog with preview/full toggle 56 | function Toggle-Changelog { 57 | param ( 58 | [string]$version, 59 | [string]$changelog, 60 | [switch]$isPreview 61 | ) 62 | Clear-Host # Clear previous output 63 | Show-Header "Changelog for version V${version}" 64 | 65 | if ($isPreview) { 66 | # Display preview (first 5 lines or a defined preview length) 67 | Write-Host "Changelog Preview: (Press 'T' to expand for full changelog)" -ForegroundColor Yellow 68 | $changelog -split "`n" | Select-Object -First 5 | ForEach-Object { Write-Host $_ -ForegroundColor Gray } 69 | } else { 70 | # Display full changelog 71 | Write-Host "Full Changelog (Press 'T' to collapse)" -ForegroundColor Yellow 72 | Write-Host $changelog -ForegroundColor Gray 73 | } 74 | } 75 | 76 | # Function to get the next versions based on the current version 77 | function Get-NextVersions { 78 | param ( 79 | [string]$currentVersion, 80 | [array]$releases 81 | ) 82 | $currentMajor = [int]($currentVersion.Split('.')[0]) 83 | $currentMinor = [int]($currentVersion.Split('.')[1]) 84 | $nextVersions = @() 85 | foreach ($release in $releases) { 86 | $releaseVersion = $release.tag_name -replace "V", "" # Extract version without 'V' 87 | $releaseMajor = [int]($releaseVersion.Split('.')[0]) 88 | $releaseMinor = [int]($releaseVersion.Split('.')[1]) 89 | 90 | # Find versions greater than the current version 91 | if ($releaseMajor -gt $currentMajor -or ($releaseMajor -eq $currentMajor -and $releaseMinor -gt $currentMinor)) { 92 | # Format as a valid version string 93 | if ($releaseMinor -eq 0) { 94 | $releaseVersion = "$releaseMajor.0" 95 | } 96 | $nextVersions += $releaseVersion 97 | } 98 | } 99 | 100 | # Sort versions as System.Version objects 101 | $nextVersions = $nextVersions | Sort-Object { [version]$_ } 102 | return $nextVersions 103 | } 104 | 105 | # Function to Show Update Process 106 | function Dis { 107 | param ( 108 | [string]$txt = "Updating" 109 | ) 110 | Write-Host "" 111 | Write-Host " - $txt" 112 | Start-Sleep -Milliseconds 100 113 | } 114 | 115 | # Function to Create Files 116 | function Create-File { 117 | param ( 118 | [string]$fileContent, 119 | [string]$fileName, 120 | [string]$fileDirectory 121 | ) 122 | $outputFilePath = [System.IO.Path]::Combine($fileDirectory, "$fileName") 123 | $fileContent | Out-File -FilePath $outputFilePath -Encoding ASCII 124 | } 125 | 126 | # Function to Create Shortcuts 127 | function Create-Shortcut { 128 | param ( 129 | [string]$target, 130 | [string]$shortcutName, 131 | [string]$shortcutType, 132 | [string]$shortcutPath = $shivaayPath 133 | ) 134 | $shell = New-Object -ComObject WScript.Shell 135 | $fullPath = Join-Path $shortcutPath $shortcutName 136 | $softPath = Join-Path $softwaresPath $shortcutName 137 | if ($shortcutType -eq "url") { 138 | $internetShortcut = $shell.CreateShortcut($softPath) 139 | $internetShortcut.TargetPath = $target 140 | $internetShortcut.Save() 141 | } else { 142 | $shortcut = $shell.CreateShortcut($fullPath) 143 | $shortcut.TargetPath = "powershell.exe" 144 | $shortcut.Arguments = "-NoProfile -ExecutionPolicy RemoteSigned -Command `"$target`"" 145 | $shortcut.Save() 146 | } 147 | } 148 | 149 | # Variables 150 | $apiUrl = "https://api.github.com/repos/ShivamXD6/Optimize-Windows/releases" 151 | $global:desktopPath = "C:\Users\Public\Desktop" 152 | $customPath = "HKLM:\Software\ShivaayOS" 153 | $global:shivaayPath = "$desktopPath\Shivaay" 154 | if (Test-Path $customPath) { 155 | try { 156 | $regValue = Get-ItemProperty -Path $customPath -Name "ShivaayFolderPath" -ErrorAction Stop 157 | $shivaayPath = $regValue."ShivaayFolderPath" 158 | } 159 | catch {} 160 | } 161 | $global:optimizationPath = "$shivaayPath\Optimizations" 162 | $global:securityPath = "$shivaayPath\Security" 163 | $global:softwaresPath = "$shivaayPath\Softwares" 164 | $global:managementPath = "$shivaayPath\System Management" 165 | $global:interfacePath = "$shivaayPath\User Interface" 166 | 167 | # Main script execution 168 | Show-Header "Checking for Updates" 169 | $releases = Fetch-Releases 170 | 171 | # Get the current model name and version 172 | $currentInfo = Get-CurrentVersion 173 | $currentModelName = $currentInfo.ModelName 174 | $currentVersion = $currentInfo.Version 175 | 176 | # Get the next versions to update to 177 | $nextVersions = Get-NextVersions -currentVersion $currentVersion -releases $releases 178 | 179 | if ($nextVersions.Count -gt 0) { 180 | Write-Host "Current model: $currentModelName - V$currentVersion" -ForegroundColor Yellow 181 | Write-Host "Available versions to update: $($nextVersions -join ', ')" -ForegroundColor Yellow 182 | Write-Host "" 183 | 184 | foreach ($nextVersion in $nextVersions) { 185 | # Get changelog for the current version 186 | $release = $releases | Where-Object { $_.tag_name -eq "V$nextVersion" } 187 | $changelog = $release.body 188 | $isPreview = $true # Start with preview mode 189 | 190 | # Toggle loop for changelog view 191 | do { 192 | Toggle-Changelog -version $nextVersion -changelog $changelog -isPreview:$isPreview 193 | Write-Host "Press 'T' to toggle between preview and full changelog, or 'Enter' to continue to update." -ForegroundColor Cyan 194 | $key = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") 195 | 196 | # Toggle preview/full view on 'T' 197 | if ($key.Character -eq 'T') { 198 | $isPreview = -not $isPreview 199 | } 200 | } until ($key.VirtualKeyCode -eq 13) # Continue on 'Enter' 201 | 202 | # Find and execute the Update.ps1 script 203 | $updateAsset = $release.assets | Where-Object { $_.name -eq "Update.ps1" } 204 | if ($updateAsset) { 205 | $scriptUrl = $updateAsset.browser_download_url 206 | Write-Host "Executing script from: $scriptUrl" -ForegroundColor Green 207 | try { 208 | irm $scriptUrl | iex 2>$null 209 | # Update the OEM info with the new version, preserving the model name 210 | Update-OEMInfo -newVersion $nextVersion -modelName $currentModelName 211 | pause 212 | } catch { 213 | Write-Host "Failed to execute the script from $scriptUrl." -ForegroundColor Red 214 | pause 215 | } 216 | } else { 217 | Write-Host "Update.ps1 script not found for release: V$nextVersion" -ForegroundColor Red 218 | pause 219 | } 220 | } 221 | } else { 222 | Write-Host "You are already using the latest version: $currentVersion" -ForegroundColor Green 223 | pause 224 | } 225 | Write-Host "" 226 | Write-Host "All Updates completed!, no more updates are available!" -ForegroundColor Green 227 | Write-Host "" 228 | pause -------------------------------------------------------------------------------- /WinISO/Add Your Windows ISO Here: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShivamXD6/Optimize-Windows/d5d34de61fe37b88361577965943579c4d35f239/WinISO/Add Your Windows ISO Here -------------------------------------------------------------------------------- /ventoy/autounattend.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 00000-00000-00000-00000-00000 14 | Always 15 | 16 | true 17 | 18 | 19 | 20 | 21 | 1 22 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f 23 | 24 | 25 | 2 26 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f 27 | 28 | 29 | 3 30 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassStorageCheck /t REG_DWORD /d 1 /f 31 | 32 | 33 | 4 34 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassCPUCheck /t REG_DWORD /d 1 /f 35 | 36 | 37 | 5 38 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f 39 | 40 | 41 | 6 42 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassDiskCheck /t REG_DWORD /d 1 /f 43 | 44 | 45 | 46 | 7 47 | cmd /c del /f /q X:\Sources\ei.cfg 48 | 49 | 50 | 8 51 | cmd /c echo [Channel] > X:\Sources\ei.cfg 52 | 53 | 54 | 9 55 | cmd /c echo _Default >> X:\Sources\ei.cfg 56 | 57 | 58 | 10 59 | cmd /c echo [VL] >> X:\Sources\ei.cfg 60 | 61 | 62 | 11 63 | cmd /c echo 0 >> X:\Sources\ei.cfg 64 | 65 | 66 | 67 | 68 | 69 | 70 | 00000-00000-00000-00000-00000 71 | Always 72 | 73 | true 74 | 75 | 76 | 77 | 1 78 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f 79 | 80 | 81 | 2 82 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f 83 | 84 | 85 | 3 86 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassStorageCheck /t REG_DWORD /d 1 /f 87 | 88 | 89 | 4 90 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassCPUCheck /t REG_DWORD /d 1 /f 91 | 92 | 93 | 5 94 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f 95 | 96 | 97 | 6 98 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassDiskCheck /t REG_DWORD /d 1 /f 99 | 100 | 101 | 7 102 | cmd /c del /f /q X:\Sources\ei.cfg 103 | 104 | 105 | 8 106 | cmd /c echo [Channel] > X:\Sources\ei.cfg 107 | 108 | 109 | 9 110 | cmd /c echo _Default >> X:\Sources\ei.cfg 111 | 112 | 113 | 10 114 | cmd /c echo [VL] >> X:\Sources\ei.cfg 115 | 116 | 117 | 11 118 | cmd /c echo 0 >> X:\Sources\ei.cfg 119 | 120 | 121 | 122 | 123 | 124 | 125 | 00000-00000-00000-00000-00000 126 | Always 127 | 128 | true 129 | 130 | 131 | 132 | 1 133 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f 134 | 135 | 136 | 2 137 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f 138 | 139 | 140 | 3 141 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassStorageCheck /t REG_DWORD /d 1 /f 142 | 143 | 144 | 4 145 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassCPUCheck /t REG_DWORD /d 1 /f 146 | 147 | 148 | 5 149 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f 150 | 151 | 152 | 6 153 | reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassDiskCheck /t REG_DWORD /d 1 /f 154 | 155 | 156 | 7 157 | cmd /c del /f /q X:\Sources\ei.cfg 158 | 159 | 160 | 8 161 | cmd /c echo [Channel] > X:\Sources\ei.cfg 162 | 163 | 164 | 9 165 | cmd /c echo _Default >> X:\Sources\ei.cfg 166 | 167 | 168 | 10 169 | cmd /c echo [VL] >> X:\Sources\ei.cfg 170 | 171 | 172 | 11 173 | cmd /c echo 0 >> X:\Sources\ei.cfg 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 1 187 | powershell.exe -NoProfile -WindowStyle Hidden -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;" 188 | 189 | 190 | 191 | 2 192 | powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\remove-packages.ps1' -Raw | Invoke-Expression;" 193 | 194 | 195 | 196 | 3 197 | powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\wintweaks.ps1' -Raw | Invoke-Expression;" 198 | 199 | 200 | 201 | 4 202 | cmd /c "C:\Windows\Setup\Scripts\localmachine.cmd" 203 | 204 | 205 | 206 | 5 207 | cmd /c "reg import C:\Windows\Setup\Scripts\contextmenu.reg" 208 | 209 | 210 | 211 | 6 212 | reg load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" 213 | 214 | 215 | 216 | 7 217 | reg add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "currentuser" /t REG_SZ /d "C:\Windows\Setup\Scripts\currentuser.cmd" /f 218 | 219 | 220 | 221 | 8 222 | reg unload "HKU\DefaultUser" 223 | 224 | 225 | 226 | 227 | 228 | 229 | 1 230 | powershell.exe -NoProfile -WindowStyle Hidden -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;" 231 | 232 | 233 | 2 234 | powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\remove-packages.ps1' -Raw | Invoke-Expression;" 235 | 236 | 237 | 3 238 | powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\wintweaks.ps1' -Raw | Invoke-Expression;" 239 | 240 | 241 | 4 242 | cmd /c "C:\Windows\Setup\Scripts\localmachine.cmd" 243 | 244 | 245 | 5 246 | cmd /c "reg import C:\Windows\Setup\Scripts\contextmenu.reg" 247 | 248 | 249 | 6 250 | reg load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" 251 | 252 | 253 | 7 254 | reg add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "currentuser" /t REG_SZ /d "C:\Windows\Setup\Scripts\currentuser.cmd" /f 255 | 256 | 257 | 8 258 | reg unload "HKU\DefaultUser" 259 | 260 | 261 | 262 | 263 | 264 | 265 | 1 266 | powershell.exe -NoProfile -WindowStyle Hidden -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;" 267 | 268 | 269 | 2 270 | powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\remove-packages.ps1' -Raw | Invoke-Expression;" 271 | 272 | 273 | 3 274 | powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\wintweaks.ps1' -Raw | Invoke-Expression;" 275 | 276 | 277 | 4 278 | cmd /c "C:\Windows\Setup\Scripts\localmachine.cmd" 279 | 280 | 281 | 5 282 | cmd /c "reg import C:\Windows\Setup\Scripts\contextmenu.reg" 283 | 284 | 285 | 6 286 | reg load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" 287 | 288 | 289 | 7 290 | reg add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "currentuser" /t REG_SZ /d "C:\Windows\Setup\Scripts\currentuser.cmd" /f 291 | 292 | 293 | 8 294 | reg unload "HKU\DefaultUser" 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | true 307 | true 308 | true 309 | true 310 | Work 311 | 3 312 | 313 | 314 | 315 | 316 | 317 | true 318 | true 319 | true 320 | true 321 | Work 322 | 3 323 | 324 | 325 | 326 | 327 | 328 | true 329 | true 330 | true 331 | true 332 | Work 333 | 3 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | param( 343 | [xml] $Document 344 | ); 345 | 346 | $scriptsDir = 'C:\Windows\Setup\Scripts\'; 347 | foreach( $file in $Document.unattend.Extensions.File ) { 348 | $path = [System.Environment]::ExpandEnvironmentVariables( 349 | $file.GetAttribute( 'path' ) 350 | ); 351 | if( $path.StartsWith( $scriptsDir ) ) { 352 | mkdir -Path $scriptsDir -ErrorAction 'SilentlyContinue'; 353 | } 354 | $encoding = switch( [System.IO.Path]::GetExtension( $path ) ) { 355 | { $_ -in '.ps1', '.xml' } { [System.Text.Encoding]::UTF8; } 356 | { $_ -in '.reg', '.vbs', '.js' } { [System.Text.UnicodeEncoding]::new( $false, $true ); } 357 | default { [System.Text.Encoding]::Default; } 358 | }; 359 | [System.IO.File]::WriteAllBytes( $path, ( $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() ) ) ); 360 | } 361 | 362 | 363 | 364 | 365 | 430 | 431 | 432 | 433 | 434 | nul 2>&1 524 | if %errorLevel% neq 0 ( 525 | echo Please Run as Administrator. 526 | pause & exit 527 | ) 528 | if "%~n0"=="Install Microsoft Store" ( 529 | call :INMS 530 | ) else ( 531 | call :UNMS 532 | ) 533 | 534 | :INMS 535 | PowerShell -ExecutionPolicy Bypass -Command "Get-AppxPackage -AllUsers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register \"$($_.InstallLocation)\AppXManifest.xml\"}" 536 | ren "%~dpnx0" "Uninstall - Microsoft Store.cmd" 537 | exit /b 538 | 539 | :UNMS 540 | PowerShell -ExecutionPolicy Bypass -Command "Get-AppxPackage -Allusers Microsoft.WindowsStore | Remove-AppxPackage" 541 | ren "%~dpnx0" "Install - Microsoft Store.cmd" 542 | exit /b 543 | '@ 544 | Create-File -fileContent $MSStore -fileName 'Uninstall - Microsoft Store.cmd' -fileDirectory $softwaresPath 545 | 546 | # Security 547 | # Toggle Defender 548 | $Defender = @" 549 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 550 | if %errorLevel% neq 0 ( 551 | echo Please Run as Administrator. 552 | pause & exit 553 | ) 554 | set reg1="HKLM\SYSTEM\CurrentControlSet\Services\Sense" 555 | set reg2="HKLM\SYSTEM\CurrentControlSet\Services\WdBoot" 556 | set reg3="HKLM\SYSTEM\CurrentControlSet\Services\WdFilter" 557 | set reg4="HKLM\SYSTEM\CurrentControlSet\Services\WdNisDrv" 558 | set reg5="HKLM\SYSTEM\CurrentControlSet\Services\WdNisSvc" 559 | set reg6="HKLM\SYSTEM\CurrentControlSet\Services\WinDefend" 560 | set reg7="HKLM\SYSTEM\CurrentControlSet\Services\MDCoreSvc" 561 | set reg8="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 562 | set reg9="HKCR\*\shellex\ContextMenuHandlers\EPP" 563 | set reg10="HKCR\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\InprocServer32" 564 | set reg11="HKCR\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\Version" 565 | set reg12="HKCR\Directory\shellex\ContextMenuHandlers\EPP" 566 | set reg13="HKCR\Drive\shellex\ContextMenuHandlers\EPP" 567 | set reg14="HKCR\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}" 568 | set reg15="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Virus and threat protection" 569 | set reg16="HKLM\SYSTEM\CurrentControlSet\Services\webthreatdefsvc" 570 | bcdedit | findstr /i "safeboot" 571 | if %ERRORLEVEL% EQU 0 ( 572 | if "%~n0"=="Enable - Defender" ( 573 | reg add %reg1% /v Start /t REG_DWORD /d 2 /f 574 | reg add %reg2% /v Start /t REG_DWORD /d 0 /f 575 | reg add %reg3% /v Start /t REG_DWORD /d 0 /f 576 | reg add %reg4% /v Start /t REG_DWORD /d 2 /f 577 | reg add %reg5% /v Start /t REG_DWORD /d 2 /f 578 | reg add %reg6% /v Start /t REG_DWORD /d 2 /f 579 | reg add %reg7% /v Start /t REG_DWORD /d 2 /f 580 | reg add %reg8% /v "SecurityHealth" /t REG_SZ /d "%windir%\system32\SecurityHealthSystray.exe" /f 581 | reg add %reg9% /ve /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f 582 | reg add %reg10% /ve /d "C:\\Program Files\\Windows Defender\\shellext.dll" /f 583 | reg add %reg10% /v "ThreadingModel" /d "Apartment" /f 584 | reg add %reg11% /ve /d "10.0.18362.1" /f 585 | reg add %reg12% /ve /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f 586 | reg add %reg13% /ve /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f 587 | reg delete %reg15% /v "UILockdown" /f 588 | reg add %reg16% /v Start /t REG_DWORD /d 2 /f 589 | ren "%~dpnx0" "Disable - Defender.cmd" 590 | ) else ( 591 | reg add %reg1% /v Start /t REG_DWORD /d 4 /f 592 | reg add %reg2% /v Start /t REG_DWORD /d 4 /f 593 | reg add %reg3% /v Start /t REG_DWORD /d 4 /f 594 | reg add %reg4% /v Start /t REG_DWORD /d 4 /f 595 | reg add %reg5% /v Start /t REG_DWORD /d 4 /f 596 | reg add %reg6% /v Start /t REG_DWORD /d 4 /f 597 | reg add %reg7% /v Start /t REG_DWORD /d 4 /f 598 | reg delete %reg8% /v "SecurityHealth" /f 599 | reg delete %reg9% /f 600 | reg delete %reg14% /f 601 | reg delete %reg12% /f 602 | reg delete %reg13% /f 603 | reg add %reg15% /v UILockdown /t REG_DWORD /d 1 /f 604 | reg add %reg16% /v Start /t REG_DWORD /d 4 /f 605 | ren "%~dpnx0" "Enable - Defender.cmd" 606 | ) 607 | bcdedit /deletevalue {current} safeboot 608 | reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "Shell" /t REG_SZ /d "explorer.exe" /f 609 | shutdown /r /f /t 1 610 | ) else ( 611 | bcdedit /set {current} safeboot minimal 612 | reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "Shell" /t REG_SZ /d "explorer.exe, cmd /c \"%~dpnx0\"" /f 613 | shutdown /r /f /t 1 614 | ) 615 | "@ 616 | Create-File -fileContent $Defender -fileName 'Disable - Defender.cmd' -fileDirectory $securityPath 617 | 618 | # Toggle Core Isolation 619 | $coreIsolation = @" 620 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 621 | if %errorLevel% neq 0 ( 622 | echo Please Run as Administrator. 623 | pause & exit 624 | ) 625 | set reg1="HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" 626 | set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\Device security" 627 | set reg3="HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\KernelShadowStacks" 628 | set reg4="HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\CredentialGuard" 629 | set reg5="HKLM\SYSTEM\CurrentControlSet\Control\Lsa" 630 | set reg6="HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" 631 | 632 | if "%~n0"=="Enable - Core Isolation" ( 633 | reg add %reg1% /v Enabled /t REG_DWORD /d 1 /f 634 | reg delete %reg2% /v "UILockdown" /f 635 | reg add %reg3% /v Enabled /t REG_DWORD /d 1 /f 636 | reg add %reg4% /v Enabled /t REG_DWORD /d 1 /f 637 | reg add %reg5% /v RunAsPPL /t REG_DWORD /d 1 /f 638 | reg add %reg6% /v "EnableVirtualizationBasedSecurity" /t REG_DWORD /d 1 /f 639 | ren "%~dpnx0" "Disable - Core Isolation.cmd" 640 | ) else ( 641 | reg add %reg1% /v Enabled /t REG_DWORD /d 0 /f 642 | reg add %reg2% /v "UILockdown" /t REG_DWORD /d 1 /f 643 | reg add %reg3% /v Enabled /t REG_DWORD /d 0 /f 644 | reg add %reg4% /v Enabled /t REG_DWORD /d 0 /f 645 | reg add %reg5% /v RunAsPPL /t REG_DWORD /d 0 /f 646 | reg add %reg6% /v "EnableVirtualizationBasedSecurity" /t REG_DWORD /d 0 /f 647 | ren "%~dpnx0" "Enable - Core Isolation.cmd" 648 | ) 649 | "@ 650 | Create-File -fileContent $coreIsolation -fileName 'Disable - Core Isolation.cmd' -fileDirectory $securityPath 651 | 652 | # System Management 653 | # Toggle Hibernation and Fast Startup 654 | $hibernation = @" 655 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 656 | if %errorLevel% neq 0 ( 657 | echo Please Run as Administrator. 658 | pause & exit 659 | ) 660 | if "%~n0"=="Enable - Hibernation and Fast Startup" ( 661 | powercfg /hibernate on 662 | reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 1 /f 663 | ren "%~dpnx0" "Disable - Hibernation and Fast Startup.cmd" 664 | ) else ( 665 | powercfg /hibernate off 666 | ren "%~dpnx0" "Enable - Hibernation and Fast Startup.cmd" 667 | ) 668 | "@ 669 | Create-File -fileContent $hibernation -fileName 'Enable - Hibernation and Fast Startup.cmd' -fileDirectory $managementPath 670 | 671 | # Toggle Update Notifications 672 | $updateNotify = @" 673 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 674 | if %errorLevel% neq 0 ( 675 | echo Please Run as Administrator. 676 | pause & exit 677 | ) 678 | set reg1="HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" 679 | set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" 680 | if "%~n0"=="Enable - Update Notifications" ( 681 | reg delete %reg1% /v RestartNotificationsAllowed2 /f 682 | reg delete %reg2% /v SetAutoRestartNotificationDisable /f 683 | reg delete %reg2% /v SetUpdateNotificationLevel /f 684 | ren "%~dpnx0" "Disable - Update Notifications.cmd" 685 | ) else ( 686 | reg add %reg1% /v RestartNotificationsAllowed2 /t REG_DWORD /d 0 /f 687 | reg add %reg2% /v SetAutoRestartNotificationDisable /t REG_DWORD /d 1 /f 688 | reg add %reg2% /v SetUpdateNotificationLevel /t REG_DWORD /d 2 /f 689 | ren "%~dpnx0" "Enable - Update Notifications.cmd" 690 | ) 691 | "@ 692 | Create-File -fileContent $updateNotify -fileName 'Disable - Update Notifications.cmd' -fileDirectory $managementPath 693 | 694 | # Toggle Notifications and Background Apps 695 | $notification = @" 696 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 697 | if %errorLevel% neq 0 ( 698 | echo Please Run as Administrator. 699 | pause & exit 700 | ) 701 | set reg1="HKCU\Software\Policies\Microsoft\Windows\Explorer" 702 | set reg2="HKCU\Software\Microsoft\Windows\CurrentVersion\PushNotifications" 703 | set reg3="HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" 704 | if "%~n0"=="Enable - Notifications and Background Apps" ( 705 | reg add %reg1% /v DisableNotificationCenter /t REG_DWORD /d 0 /f 706 | reg add %reg2% /v ToastEnabled /t REG_DWORD /d 1 /f 707 | reg delete %reg3% /v LetAppsRunInBackground /f 708 | set st="Disable - Notifications and Background Apps.cmd" 709 | ) else ( 710 | reg add %reg1% /v DisableNotificationCenter /t REG_DWORD /d 1 /f 711 | reg add %reg2% /v ToastEnabled /t REG_DWORD /d 0 /f 712 | reg add %reg3% /v LetAppsRunInBackground /t REG_DWORD /d 2 /f 713 | set st="Enable - Notifications and Background Apps.cmd" 714 | ) 715 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 716 | "@ 717 | Create-File -fileContent $notification -fileName 'Disable - Notifications and Background Apps.cmd' -fileDirectory $managementPath 718 | 719 | # Optimizations 720 | # Cleanup 721 | $cleanup = @' 722 | # Kill Process, Ignore Errors and Continue 723 | $ErrorActionPreference = 'SilentlyContinue' 724 | Get-Process -Name cleanmgr -EA 0 | Stop-Process -Force -EA 0 725 | 726 | # Function to display sections 727 | function Show-Message ($message) { 728 | Write-Output "===========================================" 729 | Write-Output " $message" 730 | Write-Output "===========================================" 731 | Start-Sleep -Seconds 1 732 | } 733 | 734 | # Show initial disk space 735 | $initialFreeMB = (Get-PSDrive -Name C).Free / 1MB 736 | $initialFreeGB = [math]::Round($initialFreeMB / 1024, 2) 737 | 738 | Show-Message "Using Disk Cleanup with custom configuration" 739 | $volumeCache = @{ 740 | "Active Setup Temp Folders" = 2 741 | "BranchCache" = 2 742 | "Content Indexer Cleaner" = 2 743 | "Delivery Optimization Files" = 2 744 | "Device Driver Packages" = 2 745 | "Diagnostic Data Viewer database files" = 2 746 | "Downloaded Program Files" = 2 747 | "Feedback Hub Archive log files" = 2 748 | "Internet Cache Files" = 2 749 | "Language Pack" = 2 750 | "Offline Pages Files" = 2 751 | "Old ChkDsk Files" = 2 752 | "Recycle Bin" = 2 753 | "RetailDemo Offline Content" = 2 754 | "Setup Log Files" = 2 755 | "System error memory dump files" = 2 756 | "System error minidump files" = 2 757 | "Temporary Files" = 2 758 | "Temporary Setup Files" = 2 759 | "Temporary Sync Files" = 2 760 | "Update Cleanup" = 2 761 | "Upgrade Discarded Files" = 2 762 | "User file versions" = 2 763 | "Windows Defender" = 2 764 | "Windows Error Reporting Files" = 2 765 | "Windows ESD installation files" = 2 766 | "Windows Reset Log Files" = 2 767 | "Windows Upgrade Log Files" = 2 768 | } 769 | $registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches" 770 | foreach ($item in $volumeCache.GetEnumerator()) { 771 | $keyPath = Join-Path $registryPath $item.Key 772 | if (Test-Path $keyPath) { 773 | New-ItemProperty -Path $keyPath -Name StateFlags1337 -Value $item.Value -PropertyType DWord | Out-Null 774 | } 775 | } 776 | Start-Process -FilePath "$env:SystemRoot\system32\cleanmgr.exe" -ArgumentList "/sagerun:1337" -Wait:$false 777 | 778 | Show-Message "Cleaning up leftovers" 779 | $foldersToRemove = @( 780 | "C:\CbsTemp", 781 | "C:\Logs", 782 | "C:\Panther", 783 | "C:\Prefetch", 784 | "C:\ProgramData\Microsoft\Windows Defender\Scans", 785 | "C:\Program Files (x86)\Microsoft\EdgeUpdate\Download", 786 | "C:\SoftwareDistribution", 787 | "C:\System32\LogFiles", 788 | "C:\System32\LogFiles\WMI", 789 | "C:\System32\SleepStudy", 790 | "C:\System32\sru", 791 | "C:\System32\WDI\LogFiles", 792 | "C:\System32\winevt\Logs", 793 | "C:\SystemTemp", 794 | "C:\Temp" 795 | ) 796 | 797 | foreach ($folderPath in $foldersToRemove) { 798 | if (Test-Path $folderPath) { 799 | try { 800 | & takeown /F $folderPath /R /D Y *> $null 801 | & icacls $folderPath /grant Administrators:F /T *> $null 802 | Write-Output " - Deleted Files from Folder: $($folderPath)" 803 | Remove-Item -Path "$folderPath\*" -Force -Recurse 804 | } 805 | catch {} 806 | } 807 | } 808 | $fileTypes = @("C:\*.tmp", "C:\*.log", "C:\*.chk", "C:\*.old") 809 | foreach ($path in $fileTypes) { 810 | Get-ChildItem -Path $path -Recurse -Force | ForEach-Object { 811 | try { 812 | Remove-Item -Path $_.FullName -Force -Recurse 813 | Write-Output " - Deleted File: $($_.FullName)" 814 | } catch {} 815 | } 816 | } 817 | 818 | # Run DISM Component Cleanup 819 | Show-Message "Cleaning up WinSxS components" 820 | Dism /online /Cleanup-Image /StartComponentCleanup /ResetBase 821 | 822 | # Clean Empty Folders 823 | Show-Message "Cleaning Empty Folders" 824 | Get-ChildItem -Directory -Path "C:\" -Recurse | Where-Object { try { ($_.GetFiles().Count -eq 0) -and ($_.GetDirectories().Count -eq 0) } catch { $false } } | ForEach-Object { 825 | try { 826 | Remove-Item $_.FullName -Force -Recurse 827 | Write-Output " - Deleted Empty Folder: $($_.FullName)" 828 | } catch {} 829 | } 830 | 831 | # Clean System Restore Points 832 | Show-Message "Cleaning System Restore Points" 833 | vssadmin delete shadows /all /quiet | Out-Null 834 | 835 | # Show freed space 836 | $finalFreeMB = (Get-PSDrive -Name C).Free / 1MB 837 | $finalFreeGB = [math]::Round($finalFreeMB / 1024, 2) 838 | $freedSpaceMB = $finalFreeMB - $initialFreeMB 839 | $freedSpaceGB = [math]::Round($freedSpaceMB / 1024, 2) 840 | Show-Message "Before Cleanup: $initialFreeMB MB ($initialFreeGB GB) Free" 841 | Show-Message "After Cleanup: $finalFreeMB MB ($finalFreeGB GB) Free" 842 | Show-Message "Freed Space: $freedSpaceMB MB ($freedSpaceGB GB)" 843 | Pause 844 | '@ 845 | Create-File -fileContent $cleanup -fileName 'Cleanup.ps1' -fileDirectory $optimizationPath 846 | 847 | # Toggle Compact OS Mode 848 | $compactOS = @" 849 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 850 | if %errorLevel% neq 0 ( 851 | echo Please Run as Administrator. 852 | pause & exit 853 | ) 854 | if "%~n0"=="Enable - Compact OS" ( 855 | compact /CompactOS:always 856 | ren "%~dpnx0" "Disable - Compact OS.cmd" 857 | ) else ( 858 | compact /CompactOS:never 859 | ren "%~dpnx0" "Enable - Compact OS.cmd" 860 | ) 861 | "@ 862 | Create-File -fileContent $compactOS -fileName 'Enable - Compact OS.cmd' -fileDirectory $optimizationPath 863 | 864 | # Toggle GameDVR 865 | $gameDVR = @" 866 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 867 | if %errorLevel% neq 0 ( 868 | echo Please Run as Administrator. 869 | pause & exit 870 | ) 871 | set reg1="HKCU\System\GameConfigStore" 872 | set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows\GameDVR" 873 | if "%~n0"=="Enable - GameDVR" ( 874 | reg add %reg1% /v GameDVR_Enabled /t REG_DWORD /d 1 /f 875 | reg add %reg2% /v AllowGameDVR /t REG_DWORD /d 1 /f 876 | ren "%~dpnx0" "Disable - GameDVR.cmd" 877 | ) else ( 878 | reg delete %reg1% /v GameDVR_Enabled /f 879 | reg delete %reg2% /v AllowGameDVR /f 880 | ren "%~dpnx0" "Enable - GameDVR.cmd" 881 | ) 882 | "@ 883 | Create-File -fileContent $gameDVR -fileName 'Disable - GameDVR.cmd' -fileDirectory $optimizationPath 884 | 885 | # Toggle Search Indexing Service 886 | $searchIndex = @" 887 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 888 | if %errorLevel% neq 0 ( 889 | echo Please Run as Administrator. 890 | pause & exit 891 | ) 892 | if "%~n0"=="Enable - Search Indexing" ( 893 | sc config WSearch start=auto 894 | net start WSearch 895 | set st="Disable - Search Indexing.cmd" 896 | ) else ( 897 | net stop WSearch 898 | sc config WSearch start=disabled 899 | set st="Enable - Search Indexing.cmd" 900 | ) 901 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 902 | "@ 903 | Create-File -fileContent $searchIndex -fileName 'Enable - Search Indexing.cmd' -fileDirectory $optimizationPath 904 | 905 | # User Interface 906 | # Toggle Gallery and Home in File Explorer 907 | $gallery = @" 908 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 909 | if %errorLevel% neq 0 ( 910 | echo Please Run as Administrator. 911 | pause & exit 912 | ) 913 | set reg1="HKCU\Software\Classes\CLSID\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" 914 | set reg2="HKCU\Software\Classes\CLSID\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}" 915 | if "%~n0"=="Show - Gallery and Home In File Explorer" ( 916 | reg add %reg1% /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 1 /f 917 | reg add %reg2% /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 1 /f 918 | set st="Hide - Gallery and Home In File Explorer.cmd" 919 | ) else ( 920 | reg add %reg1% /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0 /f 921 | reg add %reg2% /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0 /f 922 | set st="Show - Gallery and Home In File Explorer.cmd" 923 | ) 924 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 925 | "@ 926 | Create-File -fileContent $gallery -fileName 'Hide - Gallery and Home In File Explorer.cmd' -fileDirectory $interfacePath 927 | 928 | # Toggle Recent Items in Windows 929 | $recentItems = @" 930 | @echo off & reg query "HKU\S-1-5-19" >nul 2>&1 931 | if %errorLevel% neq 0 ( 932 | echo Please Run as Administrator. 933 | pause & exit 934 | ) 935 | set reg1="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" 936 | set reg2="HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" 937 | set reg3="HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" 938 | set reg4="HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" 939 | set reg5="HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" 940 | if "%~n0%"=="Disable - Recent Items" ( 941 | reg add %reg1% /v "NoStartMenuMFUprogramsList" /t REG_DWORD /d "1" /f 942 | reg add %reg1% /v "NoRecentDocsHistory" /t REG_DWORD /d "1" /f 943 | reg add %reg2% /v "ShowOrHideMostUsedApps" /t REG_DWORD /d "1" /f 944 | reg add %reg2% /v "HideRecentlyAddedApps" /t REG_DWORD /d "1" /f 945 | reg add %reg3% /v "NoInstrumentation" /t REG_DWORD /d "1" /f 946 | reg add %reg3% /v "ClearRecentDocsOnExit" /t REG_DWORD /d "1" /f 947 | reg add %reg3% /v "NoRecentDocsHistory" /t REG_DWORD /d "1" /f 948 | reg add %reg4% /v "NoRemoteDestinations" /t REG_DWORD /d "1" /f 949 | reg add %reg5% /v "Start_TrackProgs" /t REG_DWORD /d "0" /f 950 | reg add %reg5% /v "Start_TrackDocs" /t REG_DWORD /d "0" /f 951 | set st="Enable - Recent Items.cmd" 952 | ) else ( 953 | reg delete %reg1% /v "NoStartMenuMFUprogramsList" /f 954 | reg delete %reg1% /v "NoRecentDocsHistory" /f 955 | reg delete %reg2% /v "ShowOrHideMostUsedApps" /f 956 | reg delete %reg2% /v "HideRecentlyAddedApps" /f 957 | reg delete %reg3% /v "NoInstrumentation" /f 958 | reg delete %reg3% /v "ClearRecentDocsOnExit" /f 959 | reg delete %reg3% /v "NoRecentDocsHistory" /f 960 | reg delete %reg4% /v "NoRemoteDestinations" /f 961 | reg add %reg5% /v "Start_TrackProgs" /t REG_DWORD /d "1" /f 962 | reg add %reg5% /v "Start_TrackDocs" /t REG_DWORD /d "1" /f 963 | set st="Disable - Recent Items.cmd" 964 | ) 965 | ren "%~dpnx0" %st% & taskkill /f /im explorer.exe & start explorer.exe 966 | "@ 967 | Create-File -fileContent $recentItems -fileName 'Disable - Recent Items.cmd' -fileDirectory $interfacePath 968 | 969 | # Configure Maximum Password Age in Windows 970 | net.exe accounts /maxpwage:UNLIMITED 971 | 972 | # Groups or splits svchost.exe processes based on the amount of physical memory in the system to optimize performance 973 | $ram = (Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1kb 974 | Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "SvcHostSplitThresholdInKB" -Type DWord -Value $ram -Force 975 | 976 | $autoLoggerDir = "$env:PROGRAMDATA\Microsoft\Diagnosis\ETLLogs\AutoLogger" 977 | If (Test-Path "$autoLoggerDir\AutoLogger-Diagtrack-Listener.etl") { 978 | Remove-Item "$autoLoggerDir\AutoLogger-Diagtrack-Listener.etl" 979 | } 980 | $icaclsCommand = "icacls `"$autoLoggerDir`" /deny SYSTEM:`"(OI)(CI)F`"" 981 | Invoke-Expression $icaclsCommand | Out-Null 982 | 983 | # Remove Edge 984 | Get-Process *edge* | Stop-Process -Force -ErrorAction SilentlyContinue 985 | Stop-Service -Name "MicrosoftEdgeElevationService" -Force -ErrorAction SilentlyContinue 986 | Remove-Item -Path "C:\Program Files (x86)\Microsoft\Edge" -Recurse -Force -ErrorAction Continue 987 | Remove-Item -Path "C:\Program Files (x86)\Microsoft\EdgeUpdate" -Recurse -Force -ErrorAction Continue 988 | Remove-Item -Path "C:\Users\Public\Desktop\Microsoft Edge.lnk" -Recurse -Force -ErrorAction Continue 989 | Remove-Item -Path "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Edge.lnk" -Recurse -Force -ErrorAction Continue 990 | Remove-Item -Path "C:\Windows\SystemApps\Microsoft.MicrosoftEdgeDevToolsClient_8wekyb3d8bbwe" -Recurse -Force -ErrorAction Continue 991 | Remove-Item -Path "C:\Program Files (x86)\Microsoft\EdgeWebView" -Recurse -Force -ErrorAction Continue 992 | Remove-Item -Path "C:\Program Files (x86)\Microsoft\EdgeCore" -Recurse -Force -ErrorAction Continue 993 | Remove-Item -Path "C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" -Recurse -Force -ErrorAction Continue 994 | 995 | # Remove OneDrive 996 | Remove-Item "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk" -ErrorAction SilentlyContinue 997 | Remove-Item "C:\Windows\System32\OneDriveSetup.exe" -Recurse -Force -ErrorAction Continue 998 | Remove-Item "C:\Windows\SysWOW64\OneDriveSetup.exe" -Recurse -Force -ErrorAction Continue 999 | 1000 | # Removes Microsoft Teams 1001 | $TeamsPath = [System.IO.Path]::Combine($env:LOCALAPPDATA, 'Microsoft', 'Teams') 1002 | $TeamsUpdateExePath = [System.IO.Path]::Combine($TeamsPath, 'Update.exe') 1003 | Stop-Process -Name "*teams*" -Force -ErrorAction Continue 1004 | if ([System.IO.File]::Exists($TeamsUpdateExePath)) { 1005 | # Uninstall app 1006 | $proc = Start-Process $TeamsUpdateExePath "-uninstall -s" -PassThru 1007 | $proc.WaitForExit() 1008 | } 1009 | Get-AppxPackage "*Teams*" | Remove-AppxPackage -ErrorAction Continue 1010 | Get-AppxPackage "*Teams*" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction Continue 1011 | if ([System.IO.Directory]::Exists($TeamsPath)) { 1012 | Remove-Item $TeamsPath -Force -Recurse -ErrorAction Continue 1013 | } 1014 | 1015 | # Uninstall from Uninstall registry key UninstallString 1016 | $us = (Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like '*Teams*'}).UninstallString 1017 | if ($us.Length -gt 0) { 1018 | $us = ($us.Replace('/I', '/uninstall ') + ' /quiet').Replace(' ', ' ') 1019 | $FilePath = ($us.Substring(0, $us.IndexOf('.exe') + 4).Trim()) 1020 | $ProcessArgs = ($us.Substring($us.IndexOf('.exe') + 5).Trim().replace(' ', ' ')) 1021 | $proc = Start-Process -FilePath $FilePath -Args $ProcessArgs -PassThru 1022 | $proc.WaitForExit() 1023 | } 1024 | 1025 | # Disable Teredo 1026 | netsh interface teredo set state disabled 1027 | 1028 | # Disable Scheduled Tasks 1029 | $scheduledTasks = @( 1030 | "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser", 1031 | "Microsoft\Windows\Application Experience\ProgramDataUpdater", 1032 | "Microsoft\Windows\Autochk\Proxy", 1033 | "Microsoft\Windows\Customer Experience Improvement Program\Consolidator", 1034 | "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip", 1035 | "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector", 1036 | "Microsoft\Windows\Feedback\Siuf\DmClient", 1037 | "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload", 1038 | "Microsoft\Windows\Windows Error Reporting\QueueReporting", 1039 | "Microsoft\Windows\Application Experience\MareBackup", 1040 | "Microsoft\Windows\Application Experience\StartupAppTask", 1041 | "Microsoft\Windows\Application Experience\PcaPatchDbTask", 1042 | "Microsoft\Windows\Maps\MapsUpdateTask", 1043 | "Microsoft\EdgeUpdate\EdgeUpdateTaskMachineCore", 1044 | "Microsoft\EdgeUpdate\EdgeUpdateTaskMachineUA" 1045 | ) 1046 | foreach ($task in $scheduledTasks) { 1047 | schtasks /Change /TN $task /Disable 1048 | } 1049 | 1050 | # Set Services to Manual or Disabled 1051 | $ds = @('AJRouter', 'AssignedAccessManagerSvc', 'AppIDSvc', 'BDESVC', 'DiagTrack', 'DPS', 'Fax', 'FontCache', 'InventorySvc', 'PcaSvc', 'RmSvc', 'TabletInputService', 'WSearch', 'WbioSrvc', 'webthreatdefsvc', 'lfsvc') 1052 | foreach ($dnm in $ds) { 1053 | Set-Service -Name $dnm -StartupType Disabled -ErrorAction Continue 1054 | } 1055 | $ms = @('BITS', 'CDPSvc', 'DusmSvc', 'LanmanServer', 'LanmanWorkstation', 'Spooler', 'StateRepository', 'StorSvc', 'SysMain', 'TokenBroker', 'TrkWks', 'UsoSvc', 'WpnService', 'edgeupdate', 'edgeupdatem', 'iphlpsvc', 'sppsvc') 1056 | foreach ($mnm in $ms) { 1057 | Set-Service -Name $mnm -StartupType Manual -ErrorAction Continue 1058 | } 1059 | ]]> 1060 | 1061 | 1062 | 1063 | 1064 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1318 | 1319 | 1320 | 1321 | 1322 | Sound > More sound settings > Communications" to "Do Nothing" 1528 | reg add "HKCU\Software\Microsoft\Multimedia\Audio" /v "UserDuckingPreference" /t REG_DWORD /d 3 /f 1529 | 1530 | :: Dynamically adjust Virtual Memory as per requirement upto 16GB 1531 | reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v PagingFiles /t REG_MULTI_SZ /d "C:\pagefile.sys 800 16384" /f 1532 | 1533 | :: Toggle On NumLock 1534 | powershell -ExecutionPolicy Bypass -command "$WshShell = New-Object -ComObject WScript.Shell; $WshShell.SendKeys('{NUMLOCK}')" 1535 | 1536 | :: Disable Xbox GameDVR 1537 | cmd /c "C:\Users\Public\Desktop\Shivaay\Optimizations\Disable - GameDVR.cmd" 1538 | 1539 | :: Disable Notification, Calendar Tray and Background Apps 1540 | cmd /c "C:\Users\Public\Desktop\Shivaay\System Management\Disable - Notifications and Background Apps.cmd" 1541 | 1542 | :: Hide Home and Gallery in File Explorer 1543 | cmd /c "C:\Users\Public\Desktop\Shivaay\User Interface\Hide - Gallery and Home In File Explorer.cmd" 1544 | 1545 | :: Disable Recent Items 1546 | cmd /c "C:\Users\Public\Desktop\Shivaay\User Interface\Disable - Recent Items.cmd" 1547 | 1548 | :: Disable Core Isolation 1549 | cmd /c "C:\Users\Public\Desktop\Shivaay\Security\Disable - Core Isolation.cmd" 1550 | 1551 | :: Disable Defender 1552 | cmd /c "C:\Users\Public\Desktop\Shivaay\Security\Disable - Defender.cmd" 1553 | ]]> 1554 | 1555 | 1556 | 1557 | 1559 | 1560 | 1561 | 1562 | 1563 | 1564 | 1565 | 1566 | ]]> 1567 | 1568 | 1569 | -------------------------------------------------------------------------------- /ventoy/ventoy.json: -------------------------------------------------------------------------------- 1 | { 2 | "auto_install": [ 3 | { 4 | "parent": "/WinISO", 5 | "template": ["/ventoy/autounattend.xml"], 6 | "autosel": 1 7 | } 8 | ] 9 | } 10 | --------------------------------------------------------------------------------