├── README.md └── RepairTweaks.ps1 /README.md: -------------------------------------------------------------------------------- 1 | ## Repair Bad Tweaks 2 | 3 | image 4 | 5 | 6 | ### Why? 7 | As tweaking windows becomes more popular self proclaimed experts incorrectly interpret microsoft documentation and other sources. This causes less tech savvy people to blindly trust these "tweakers" and negatively effect the performance of their operating system. This script aims to revert these tweaks to their default values. 8 | 9 | ### How to Use? 10 | #### Option 1: 11 | Run Script From Terminal or PowerShell Prompt as Admin 12 | ```` 13 | iwr 'https://raw.githubusercontent.com/zoicware/RepairBadTweaks/main/RepairTweaks.ps1' | iex 14 | ```` 15 | 16 | #### Option 2: 17 | Download Script and Run Locally 18 | 19 | **Note:** Unblock PowerShell Scripts on Windows 11 before running to avoid it closing instantly 20 | 21 | ```Set-executionpolicy Unrestricted -Force``` 22 | 23 | ### Tweaks Explained 24 | - **Jump to a Tweak:** 25 | 26 | - [Svc Split Threshold](#svc-split-threshold) 27 | 28 | - [Bcdedit](#bcdedit) 29 | - [Timer Resolution](#timer-resolution) 30 | - [Win32PrioritySeparation](#win32priorityseparation) 31 | - [Tcp Auto-Tuning](#tcp-auto-tuning) 32 | - [Prefetch and Superfetch (Sysmain)](#prefetch-and-superfetch-sysmain) 33 | - [Windows Error Reporting](#windows-error-reporting) 34 | - [Ordinary DPCs](#ordinary-dpcs) 35 | - [Spectre Meltdown Mitigations](#spectre-meltdown-mitigations) 36 | - [HPET](#hpet) 37 | - [Mouse Keyboard Queue Size](#mouse-keyboard-queue-size) 38 | - [Csrss Priority](#Csrss-Priority) 39 | 40 | 41 | ### Svc Split Threshold 42 | - This tweak is completely visual in task manager and does not actually decrease processes. Microsoft recommends having a separate service host for certain services to increase system stability and resource management [Read More](https://learn.microsoft.com/en-us/windows/application-management/svchost-service-refactoring) 43 | 44 | 45 | ### Bcdedit 46 | - Values Checked and Repaired: 47 | - useplatformclock 48 | - disabledynamictick 49 | - useplatformtick 50 | - tscsyncpolicy 51 | 52 | These values are not set by default and should only be used for debugging (recommended by microsoft). These are typically changed in relation to timer res (read more below). 53 | ### Timer Resolution 54 | - Possibly the most widely misunderstood part of windows as this tweak is "believed" by many to decrease input lag and increase fps. Unfortunately timer resolution has nothing to do with either of these things. Operating system timers are used to sync events and keep track of how long a process took to complete. This is essential in online gaming where things are not in real time rather predicted. Many apps will set timer resolution to 1ms, however this is simply a resolution not a set value. Some people have noticed that this value is not always exactly the same, this is by design [Read More](https://stackoverflow.com/questions/3744032/why-are-net-timers-limited-to-15-ms-resolution) 55 | 56 | 57 | **NOTE** Windows does not use just 1 timer to keep track of events there are many timers you can see them with cpuz, this is also why professional benchmarks are measured using a number of these to get the most accurate metrics. Additionally, for very fast/accurate events a performance counter is likely to be used [Read More](https://learn.microsoft.com/en-us/windows/win32/api/profileapi/nf-profileapi-queryperformancecounter) 58 | 59 | 60 | ### Win32PrioritySeparation 61 | - This registry value tells the windows scheduler how much cpu time a process should get. While there is lots of options outside of the two "**Adjust for best performance: programs or background services**" in legacy control panel, the default value when using "Programs" gives the scheduler the ideal cpu time for boosting foreground apps (longer cpu time). 62 | **NOTE This will not affect input lag in anyway as I/O are received as interrupts and take cpu priority** 63 | 64 | ### Tcp Auto-Tuning 65 | - Auto tuning allows the system to dynamically adjust the receive window for incoming data using TCP [Transmission Control Protocol] [Read More](https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/receive-window-auto-tuning-for-http#how-receive-window-auto-tuning-feature-improves-data-transfer). For online gaming we do not care about this protocol as the more important events are being sent using UDP [User Datagram Protocol]. This also means the popular tcp optimizer program is completely useless for improving your network related to gaming. 66 | 67 | 68 | ### Prefetch and Superfetch (Sysmain) 69 | - Prefetch in Windows caches necessary data for apps instead of retrieving it from memory every time the program is launched. This helps apps to start up faster with no negative system performance drawbacks (some disk space...). 70 | 71 | 72 | - Superfetch is very similar to prefetch however it is able to change its caching parameters based on your frequently used apps. This is important because why would you need to cache an app you only used once. Disabling either of these will only slow your operating system down and increase loading times of apps. 73 | 74 | ### Windows Error Reporting 75 | - For some reason some tweak guides will disable windows error reporting. If this service is disabled no mini dump file will be made when getting a BSOD. So good luck reading about the error code with your preferred bluescreen viewer. 76 | 77 | ### Ordinary DPCs 78 | - DPC [Deferred Procedure Call] tells the windows scheduler to defer a lower priority task for an interrupt (typically I/O). Starting in Vista Microsoft added threaded dpcs to decrease system latency when lots of dpcs are on the system. For some reason people think using ordinary dpcs helps input lag while Microsoft explicitly recommend using threaded [Read More](https://learn.microsoft.com/en-us/windows-hardware/drivers/kernel/introduction-to-threaded-dpcs) 79 | 80 | ### Spectre Meltdown Mitigations 81 | - Disabling these mitigations does not improve gaming performance and only leaves your system vulnerable to very dangerous exploits. You can find many benchmarks online showing that disabling these does not help however I always recommend doing your own with a fps analytics tool such as CapFrameX. 82 | 83 | ### HPET 84 | - Luckily this tweak is quite "legacy" however some people still disable HPET in device manager. This is a hardware timer similar to performance counter and is able to get extremely precise events. This was likely thought to help latency in the past because of the decrease latency reading in latencymon. HPET can produce interrupts thus when disabling latencymon will show a lower reading [Read More](https://en.wikipedia.org/wiki/High_Precision_Event_Timer). 85 | 86 | ### Mouse Keyboard Queue Size 87 | - These registry values decide how many bytes are allocated to the non-paged pool for mice and keyboards by default mice get 24 bytes and keyboards get 12 bytes. Each time an interrupt from these devices is received bytes are "freed" dynamically based on the amount of data. Changing these from the default values will have no effect on mouse and keyboard latency. 88 | 89 | ### Csrss Priority 90 | - Csrss.exe is a critical system process responsible for things like loading assemblies. For some reason a tweak has gone around to change the priority class of this process. Changing the priority class for any process is a bad idea but especially csrss.exe since its a critical process meaning a crash will cause a BSOD to occur. Learn More about why changing priorities is a bad idea [Here](https://learn.microsoft.com/en-us/windows/win32/procthread/scheduling-priorities#priority-class) 91 | -------------------------------------------------------------------------------- /RepairTweaks.ps1: -------------------------------------------------------------------------------- 1 | #repair bad tweaks by zoic 2 | If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]'Administrator')) { 3 | Start-Process PowerShell.exe -ArgumentList ("-NoProfile -ExecutionPolicy Bypass -File `"{0}`"" -f $PSCommandPath) -Verb RunAs 4 | Exit 5 | } 6 | 7 | #global vars 8 | $Global:currentControlSet = 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet' 9 | $Global:controlSet001 = 'HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001' 10 | 11 | #function to check for bad tweaks returns hastable 12 | function checkTweaks { 13 | #hashtable for tweaks 14 | $tweaksTable = @{} 15 | $tweaks = @( 16 | 'Svc Split Threshold', 17 | 'Bcdedit', 18 | 'Timer Resolution', 19 | 'Win32PrioritySeparation', 20 | 'Tcp Auto-Tuning', 21 | 'Prefetch', 22 | 'Windows Error Reporting', 23 | 'Sysmain Service', 24 | 'Ordinary DPCs', 25 | 'Spectre Meltdown Mitigations', 26 | 'HPET', 27 | 'Mouse Keyboard Queue Size', 28 | 'Csrss Priority' 29 | ) 30 | #add to hashtable 31 | foreach ($tweak in $tweaks) { 32 | $tweaksTable[$tweak] = $false 33 | } 34 | 35 | #check svc split threshold 36 | $svcSplitCurrent = Get-ItemPropertyValue -Path "registry::$currentControlSet\Control" -Name 'SvcHostSplitThresholdInKB' 37 | $svcSplitControl = Get-ItemPropertyValue -Path "registry::$controlSet001\Control" -Name 'SvcHostSplitThresholdInKB' 38 | if ($svcSplitCurrent -ne 3670016 -or $svcSplitControl -ne 3670016) { 39 | $tweaksTable['Svc Split Threshold'] = $true 40 | } 41 | 42 | #check bcdedit tweaks 43 | $bcd = bcdedit.exe 44 | #regEX with | for 'or' 45 | $values = 'useplatformclock|disabledynamictick|useplatformtick|tscsyncpolicy' 46 | if ($bcd -match $values) { 47 | $tweaksTable['Bcdedit'] = $true 48 | } 49 | 50 | #check for timer res, timer res service, islc 51 | #global scope for proper cleanup later 52 | $Global:timerRes = Get-Process -Name TimerResolution -ErrorAction SilentlyContinue 53 | $Global:timerResService = Get-Service -Name 'STR', 'Set Timer Resolution Service' -ErrorAction SilentlyContinue 54 | $Global:islc = Get-Process -Name 'Intelligent standby list cleaner ISLC' -ErrorAction SilentlyContinue 55 | 56 | if ($timerRes -or $timerResService -or $islc) { 57 | $tweaksTable['Timer Resolution'] = $true 58 | } 59 | 60 | 61 | #check win32priority 62 | $controlSetP = Get-ItemPropertyValue -Path "registry::$controlSet001\Control\PriorityControl" -Name 'Win32PrioritySeparation' 63 | $currentControlSetP = Get-ItemPropertyValue -Path "registry::$currentControlSet\Control\PriorityControl" -Name 'Win32PrioritySeparation' 64 | if ($currentControlSetP -ne 38 -or $controlSetP -ne 38) { 65 | $tweaksTable['Win32PrioritySeparation'] = $true 66 | } 67 | 68 | 69 | #check auto-tuning 70 | $autotuning = netsh interface tcp show global | Select-String 'Receive Window Auto-Tuning Level' 71 | if ($autotuning -notlike '*normal*') { 72 | $tweaksTable['Tcp Auto-Tuning'] = $true 73 | } 74 | 75 | #check prefetch 76 | $prefetchCurrent = Get-ItemPropertyValue -Path "registry::$currentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" -Name 'EnablePrefetcher' 77 | $prefetchControl = Get-ItemPropertyValue -Path "registry::$controlSet001\Control\Session Manager\Memory Management\PrefetchParameters" -Name 'EnablePrefetcher' 78 | if ($prefetchCurrent -ne 3 -or $prefetchControl -ne 3) { 79 | $tweaksTable['Prefetch'] = $true 80 | } 81 | 82 | #check sysmain service (superfetch) 83 | $start = (Get-Service -Name SysMain).StartType 84 | if ($start -ne 'Automatic') { 85 | $tweaksTable['Sysmain Service'] = $true 86 | } 87 | 88 | 89 | #check ordinary dpcs 90 | $currentDpc = (Get-ItemProperty -Path "registry::$currentControlSet\Control\Session Manager\kernel").ThreadDpcEnable 91 | $controlDpc = (Get-ItemProperty -Path "registry::$controlSet001\Control\Session Manager\kernel").ThreadDpcEnable 92 | if ($currentDpc -eq 0 -or $controlDpc -eq 0) { 93 | $tweaksTable['Ordinary DPCs'] = $true 94 | } 95 | 96 | #windows error reporting 97 | $svcStart = (Get-Service -Name WerSvc).StartType 98 | $policy = (Get-ItemProperty -Path 'registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting' -ErrorAction SilentlyContinue).Disabled 99 | if ($svcStart -ne 'Manual' -or $policy -eq 1) { 100 | $tweaksTable['Windows Error Reporting'] = $true 101 | } 102 | 103 | #check spectre and meltdown mitigations 104 | $overrideCurrent = (Get-ItemProperty -Path "registry::$currentControlSet\Control\Session Manager\Memory Management").FeatureSettingsOverride 105 | $overrideMaskCurrent = (Get-ItemProperty -Path "registry::$currentControlSet\Control\Session Manager\Memory Management").FeatureSettingsOverrideMask 106 | $overrideControl = (Get-ItemProperty -Path "registry::$controlSet001\Control\Session Manager\Memory Management").FeatureSettingsOverride 107 | $overrideMaskControl = (Get-ItemProperty -Path "registry::$controlSet001\Control\Session Manager\Memory Management").FeatureSettingsOverrideMask 108 | if ($overrideCurrent -eq 3 -or $overrideMaskCurrent -eq 3 -or $overrideControl -eq 3 -or $overrideMaskControl -eq 3) { 109 | $tweaksTable['Spectre Meltdown Mitigations'] = $true 110 | } 111 | 112 | #check High precision event timer 113 | $status = (Get-PnpDevice -FriendlyName 'High precision event timer').Status 114 | if ($status -ne 'OK') { 115 | $tweaksTable['HPET'] = $true 116 | } 117 | 118 | #check mouse and keyboard queue size 119 | #use try and catch when value doesnt exist 120 | try { 121 | $keyboardCurrent = Get-ItemPropertyValue -Path "registry::$currentControlSet\Services\kbdclass\Parameters" -Name 'KeyboardDataQueueSize' -ErrorAction SilentlyContinue 122 | } 123 | catch { 124 | #hide error 125 | } 126 | try { 127 | $mouseCurrent = Get-ItemPropertyValue -Path "registry::$currentControlSet\Services\mouclass\Parameters" -Name 'MouseDataQueueSize' -ErrorAction SilentlyContinue 128 | } 129 | catch { 130 | #hide error 131 | } 132 | try { 133 | $keyboardControl = Get-ItemPropertyValue -Path "registry::$controlSet001\Services\kbdclass\Parameters" -Name 'KeyboardDataQueueSize' -ErrorAction SilentlyContinue 134 | } 135 | catch { 136 | #hide error 137 | } 138 | try { 139 | $mouseControl = Get-ItemPropertyValue -Path "registry::$controlSet001\Services\mouclass\Parameters" -Name 'MouseDataQueueSize' -ErrorAction SilentlyContinue 140 | } 141 | catch { 142 | #hide error 143 | } 144 | 145 | #if value is null that is fine too (default value 100) 146 | if ($keyboardCurrent) { 147 | if ($keyboardCurrent -ne 100) { 148 | $tweaksTable['Mouse Keyboard Queue Size'] = $true 149 | } 150 | } 151 | if ($mouseCurrent) { 152 | if ($mouseCurrent -ne 100) { 153 | $tweaksTable['Mouse Keyboard Queue Size'] = $true 154 | } 155 | } 156 | if ($keyboardControl) { 157 | if ($keyboardControl -ne 100) { 158 | $tweaksTable['Mouse Keyboard Queue Size'] = $true 159 | } 160 | } 161 | if ($mouseControl) { 162 | if ($mouseControl -ne 100) { 163 | $tweaksTable['Mouse Keyboard Queue Size'] = $true 164 | } 165 | } 166 | 167 | #check csrss priority 168 | if (Test-Path -Path 'registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\csrss.exe\PerfOptions' -ErrorAction SilentlyContinue) { 169 | $tweaksTable['Csrss Priority'] = $true 170 | } 171 | 172 | return $tweaksTable 173 | } 174 | 175 | #pass string array 176 | function repairTweaks($tweakNames) { 177 | foreach ($tweak in $tweakNames) { 178 | #repair superfetch 179 | if ($tweak -eq 'Sysmain Service') { 180 | Set-Service -Name SysMain -StartupType Automatic 181 | } 182 | #repair threaded dpcs 183 | if ($tweak -eq 'Ordinary DPCs') { 184 | Remove-ItemProperty -Path "registry::$currentControlSet\Control\Session Manager\kernel" -Name ThreadDpcEnable -Force -ErrorAction SilentlyContinue 185 | Remove-ItemProperty -Path "registry::$controlSet001\Control\Session Manager\kernel" -Name ThreadDpcEnable -Force -ErrorAction SilentlyContinue 186 | } 187 | #repair hpet 188 | if ($tweak -eq 'HPET') { 189 | Get-PnpDevice -FriendlyName 'High precision event timer' | Enable-PnpDevice -Confirm:$false 190 | } 191 | #repair mouse keyboard queue size 192 | if ($tweak -eq 'Mouse Keyboard Queue Size') { 193 | Reg.exe add 'HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\Parameters' /v 'KeyboardDataQueueSize' /t REG_DWORD /d '100' /f *>$null 194 | Reg.exe add 'HKLM\SYSTEM\ControlSet001\Services\kbdclass\Parameters' /v 'KeyboardDataQueueSize' /t REG_DWORD /d '100' /f *>$null 195 | Reg.exe add 'HKLM\SYSTEM\CurrentControlSet\Services\mouclass\Parameters' /v 'KeyboardDataQueueSize' /t REG_DWORD /d '100' /f *>$null 196 | Reg.exe add 'HKLM\SYSTEM\ControlSet001\Services\mouclass\Parameters' /v 'KeyboardDataQueueSize' /t REG_DWORD /d '100' /f *>$null 197 | } 198 | #repair timer res 199 | if ($tweak -eq 'Timer Resolution') { 200 | #cleanup timer res depending on which is being used 201 | if ($timerRes) { 202 | $filePath = (Get-Process -Name TimerResolution -FileVersionInfo).FileName 203 | Stop-Process -Name TimerResolution -Force 204 | Remove-Item -Path $filePath -Force 205 | } 206 | if ($timerResService) { 207 | $name = (Get-Service -Name 'Set Timer Resolution Service', 'STR' -ErrorAction SilentlyContinue).Name 208 | $serviceExePath = (Get-Process -Name SetTimerResolutionService -FileVersionInfo).FileName 209 | Stop-Service -Name $name -Force 210 | Stop-Process -Name SetTimerResolutionService -Force -ErrorAction SilentlyContinue 211 | sc.exe delete $name *>$null 212 | Remove-Item -Path $serviceExePath -Force 213 | } 214 | if ($islc) { 215 | $filePath = (Get-Process -Name 'Intelligent standby list cleaner ISLC' -FileVersionInfo).FileName 216 | Stop-Process -Name 'Intelligent standby list cleaner ISLC' -Force 217 | Remove-Item -Path $filePath -Force 218 | } 219 | } 220 | #repair svc split threshold 221 | if ($tweak -eq 'Svc Split Threshold') { 222 | Reg.exe add 'HKLM\SYSTEM\ControlSet001\Control' /v 'SvcHostSplitThresholdInKB' /t REG_DWORD /d '3670016' /f *>$null 223 | Reg.exe add 'HKLM\SYSTEM\CurrentControlSet\Control' /v 'SvcHostSplitThresholdInKB' /t REG_DWORD /d '3670016' /f *>$null 224 | } 225 | #repair bcdedit 226 | if ($tweak -eq 'Bcdedit') { 227 | bcdedit.exe /deletevalue useplatformclock *>$null 228 | bcdedit.exe /deletevalue disabledynamictick *>$null 229 | bcdedit.exe /deletevalue useplatformtick *>$null 230 | bcdedit.exe /deletevalue tscsyncpolicy *>$null 231 | } 232 | #repair prefetch 233 | if ($tweak -eq 'Prefetch') { 234 | Reg.exe add 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters' /v 'EnablePrefetcher' /t REG_DWORD /d '3' /f *>$null 235 | Reg.exe add 'HKLM\SYSTEM\ControlSet001\Control\Session Manager\Memory Management\PrefetchParameters' /v 'EnablePrefetcher' /t REG_DWORD /d '3' /f *>$null 236 | } 237 | #repair win32priorityseperation 238 | if ($tweak -eq 'Win32PrioritySeparation') { 239 | Reg.exe add 'HKLM\SYSTEM\ControlSet001\Control\PriorityControl' /v 'Win32PrioritySeparation' /t REG_DWORD /d '38' /f *>$null 240 | Reg.exe add 'HKLM\SYSTEM\CurrentControlSet\Control\PriorityControl' /v 'Win32PrioritySeparation' /t REG_DWORD /d '38' /f *>$null 241 | } 242 | #repair tcp autotuning 243 | if ($tweak -eq 'Tcp Auto-Tuning') { 244 | netsh.exe interface tcp set global autotuninglevel=normal *>$null 245 | } 246 | #repair spectre meltdown 247 | if ($tweak -eq 'Spectre Meltdown Mitigations') { 248 | Remove-ItemProperty -Path "registry::$currentControlSet\Control\Session Manager\Memory Management" -Name FeatureSettingsOverride -Force -ErrorAction SilentlyContinue 249 | Remove-ItemProperty -Path "registry::$controlSet001\Control\Session Manager\Memory Management" -Name FeatureSettingsOverride -Force -ErrorAction SilentlyContinue 250 | Remove-ItemProperty -Path "registry::$currentControlSet\Control\Session Manager\Memory Management" -Name FeatureSettingsOverrideMask -Force -ErrorAction SilentlyContinue 251 | Remove-ItemProperty -Path "registry::$controlSet001\Control\Session Manager\Memory Management" -Name FeatureSettingsOverrideMask -Force -ErrorAction SilentlyContinue 252 | } 253 | #repair windows error reporting 254 | if ($tweak -eq 'Windows Error Reporting') { 255 | Set-Service -Name WerSvc -StartupType Manual -Force 256 | Remove-ItemProperty -Path 'registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting' -Name 'Disabled' -Force -ErrorAction SilentlyContinue 257 | } 258 | #repair csrss priority 259 | if ($tweak -eq 'Csrss Priority') { 260 | Remove-Item -Path 'registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\csrss.exe\PerfOptions' -Recurse -Force 261 | } 262 | 263 | } 264 | } 265 | 266 | Write-Host 'Checking For Bad Tweaks...' 267 | $getTweaks = checkTweaks 268 | $trueCount = 0 269 | $badTweaksName = @() 270 | foreach ($tweak in $getTweaks.GetEnumerator()) { 271 | #if bad tweak is found 272 | if ($tweak.Value) { 273 | $badTweaksName += $tweak.Key 274 | Write-Host "[$($tweak.Key)]" -ForegroundColor Red 275 | } 276 | else { 277 | $trueCount++ 278 | Write-Host "[$($tweak.Key)]" -ForegroundColor Green 279 | } 280 | } 281 | #no bad tweaks found 282 | if ($trueCount -eq $getTweaks.Count) { 283 | Write-Host 'No Bad Tweaks Found!' 284 | $input = Read-Host 'Press ANY Key to Exit...' 285 | if ($input) { 286 | exit 287 | } 288 | } 289 | else { 290 | #use choice cmdlet 291 | choice.exe /c yn /n /m 'Press Y to Repair Bad Tweaks (N to SKIP)' 292 | if ($LASTEXITCODE -eq 1) { 293 | repairTweaks $badTweaksName 294 | #call check tweaks to confirm they have been repaired 295 | $getTweaks = checkTweaks 296 | $trueCount = 0 297 | $badTweaksName = @() 298 | foreach ($tweak in $getTweaks.GetEnumerator()) { 299 | #if bad tweak is found 300 | if ($tweak.Value) { 301 | $badTweaksName += $tweak.Key 302 | } 303 | else { 304 | $trueCount++ 305 | } 306 | } 307 | if ($trueCount -eq $getTweaks.Count) { 308 | Write-Host 'Tweaks Repaired Successfully!' 309 | $input = Read-Host 'Press ANY Key to Exit...' 310 | if ($input) { 311 | exit 312 | } 313 | } 314 | else { 315 | Write-Host 'Tweaks Not Repaired:' 316 | foreach ($name in $badTweaksName) { 317 | Write-Host "[$($name)]" -ForegroundColor Red 318 | } 319 | } 320 | } 321 | else { 322 | exit 323 | } 324 | } --------------------------------------------------------------------------------