├── Auto Optimization ├── AutoOptimization.bat └── tasklist.txt ├── Gaming Optimization Extended (Outdated) └── Gaming Optimization Extended.bat ├── Gaming Optimization └── Gaming Optimization.bat ├── README.md └── icon.ico /Auto Optimization/AutoOptimization.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | title Auto Optimization (WIP) 3 | setlocal enabledelayedexpansion 4 | 5 | :: request admin permission 6 | echo Checking for Admin Permissions... 7 | if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b) 8 | cd "%~dp0" 9 | 10 | :: checking if the build number is higher than 20348 to see if it's 11 and less than 10240 for anything before 10 11 | :winver 12 | for /f "tokens=4-6 delims=.] " %%i in ('ver') do set VERSION=%%i%%j%%k 13 | if %version% GTR 10020348 (set osver=Windows 11 - Supported) else (set osver=Windows 10 - Supported) 14 | if %version% LSS 10010240 goto not_supported 15 | 16 | :start 17 | cls 18 | echo. 19 | echo //////////////////////// 20 | echo // Auto Optimization // 21 | echo //////////////////////// 22 | echo. 23 | echo Gaming Optimization which applies automatically (still WIP). 24 | echo. 25 | echo Current OS: %osver% 26 | echo Welcome %username%. 27 | echo. 28 | goto fetch_list 29 | 30 | :fetch_list 31 | echo Fetching Processes from list... 32 | set "tasklist_file=tasklist.txt" 33 | if not exist "%tasklist_file%" ( 34 | echo Tasklist file not found. 35 | exit /b 36 | ) 37 | set "tasks=" 38 | for /f "tokens=*" %%a in (%tasklist_file%) do ( 39 | set "tasks=!tasks!%%a " 40 | ) 41 | timeout /t 2 >nul 42 | goto scan_running 43 | 44 | :scan_running 45 | echo Scanning for running tasks... 46 | goto scan1 47 | 48 | :scan_notrunning 49 | cls 50 | echo Waiting for task %running_task% to stop... 51 | goto scan2 52 | 53 | :scan1 54 | set "running_task=" 55 | for %%t in (%tasks%) do ( 56 | tasklist | find "%%t" >nul 57 | if !errorlevel! == 0 ( 58 | set "running_task=%%t" 59 | goto optimize 60 | ) 61 | ) 62 | timeout /t 2 >nul 63 | goto scan1 64 | 65 | :scan2 66 | tasklist | find "%running_task%" >nul 67 | if %errorlevel% == 1 goto revert 68 | timeout /t 2 >nul 69 | goto scan2 70 | 71 | :optimize 72 | echo Process found: %running_task%, continue with optimization... 73 | 74 | :: list of services to be backed up, disabled and stopped 75 | setlocal EnableDelayedExpansion 76 | set "services=seclogon CDPSvc CscService PhoneSvc Fax InstallService icssvc SEMgrSvc SmsRouter Spooler SysMain WpnService WSearch stisvc TabletInputService DiagTrack MapsBroker CertPropSvc WbioSrvc wuauserv BDESVC DPS fhsvc SharedAccess Netlogon PcaSvc WpcMonSvc lmhosts WerSvc FrameServer wisvc VaultSvc BTAGService DusmSvc DoSvc dmwappushservice lfsvc NcdAutoSetup QWAVE RmSvc RasMan RasAuto ScDeviceEnum SCardSvr TapiSrv DispBrokerDesktopSvc LanmanServer LanmanWorkstation SENS fdPHost FDResPub" 77 | 78 | :: Backup current start types and running statuses to a file 79 | if not exist "%appdata%\Gaming Optimization" (md "%appdata%\Gaming Optimization") 80 | set backupFile="%appdata%\Gaming Optimization\service_backup.txt" 81 | echo. > %backupFile% 82 | for %%S in (%services%) do ( 83 | rem Fetch start type 84 | for /f "tokens=3" %%T in ('sc qc "%%S" ^| findstr "START_TYPE"') do ( 85 | set "startType=%%T" 86 | ) 87 | :: fetch running status 88 | for /f "tokens=4" %%R in ('sc query "%%S" ^| findstr "STATE"') do ( 89 | if "%%R"=="RUNNING" ( 90 | set "runningStatus=running" 91 | ) else ( 92 | set "runningStatus=stopped" 93 | ) 94 | ) 95 | echo %%S !startType! !runningStatus! >> %backupFile% 96 | ) 97 | 98 | :: disable and stop services 99 | for %%S in (%services%) do ( 100 | sc config "%%S" start= disabled 101 | sc stop "%%S" 102 | ) 103 | 104 | :: closing unessesary tasks 105 | taskkill /F /IM "explorer.exe" 106 | taskkill /F /IM "Microsoft.Photos.exe" 107 | taskkill /F /IM "WinStore.App.exe" 108 | taskkill /F /IM "TaskInputHost.exe" 109 | taskkill /F /IM "ShellExperienceHost.exe" 110 | taskkill /F /IM "GameBarPresenceWriter.exe" 111 | taskkill /F /IM "atieclxx.exe" 112 | taskkill /F /IM "RtkNGUI64.exe" 113 | taskkill /F /IM "spoolsv.exe" 114 | 115 | :: lowering common process priorities 116 | wmic process where name="chrome.exe" CALL setpriority "16384" 117 | wmic process where name="firefox.exe" CALL setpriority "16384" 118 | wmic process where name="steam.exe" CALL setpriority "64" 119 | wmic process where name="steamservice.exe" CALL setpriority "64" 120 | wmic process where name="steamwebhelper.exe" CALL setpriority "64" 121 | wmic process where name="GameOverlayUI.exe" CALL setpriority "64" 122 | goto scan_notrunning 123 | 124 | :: deleting unessesary stuff such as the recycle bin, temp folders, prefetch folder and leftover windows update files 125 | rd /s /q C:\$Recycle.bin 126 | rd /s /q "C:\Windows\Prefetch" 127 | rd /s /q "C:\Windows\Temp" 128 | rd /s /q "C:\Windows\SoftwareDistribution\Download" 129 | rd /s /q "%localappdata%\Temp" 130 | md "C:\Windows\Prefetch" 131 | md "C:\Windows\Temp" 132 | md "C:\Windows\SoftwareDistribution\Download" 133 | md "%localappdata%\Temp" 134 | 135 | :: flusing dns 136 | ipconfig/flushDNS 137 | cls 138 | goto scan_notrunning 139 | 140 | :revert 141 | echo Process %running_task% has stopped, reverting... 142 | 143 | :: starting previously closed tasks 144 | start explorer.exe 145 | 146 | :: backup file with original start types and running statuses 147 | set backupFile="%appdata%\Gaming Optimization\service_backup.txt" 148 | 149 | :: read and restore start types and running statuses 150 | for /f "usebackq tokens=1,2,3" %%S in (%backupFile%) do ( 151 | rem Correctly format the start type for sc config 152 | set startType=%%T 153 | 154 | if "!startType!"=="2" set startType=auto 155 | if "!startType!"=="3" set startType=demand 156 | if "!startType!"=="4" set startType=disabled 157 | if "!startType!"=="0" set startType=boot 158 | if "!startType!"=="1" set startType=system 159 | if "!startType!"=="delayed-auto" set startType=delayed-auto rem Add this if delayed is used 160 | 161 | :: restore start type 162 | sc config "%%S" start= !startType! 163 | 164 | rem Restore running state if it was running 165 | if "%%U"=="running" ( 166 | sc start "%%S" 167 | ) 168 | ) 169 | 170 | :: changing priorities of common processes to normal 171 | wmic process where name="chrome.exe" CALL setpriority "32" 172 | wmic process where name="firefox.exe" CALL setpriority "32" 173 | wmic process where name="steam.exe" CALL setpriority "32" 174 | wmic process where name="steamservice.exe" CALL setpriority "32" 175 | wmic process where name="steamwebhelper.exe" CALL setpriority "32" 176 | cls 177 | goto scan_running 178 | 179 | :not_supported 180 | :: prompts the User to exit since they are below supported os versions 181 | cls 182 | echo. 183 | echo Your current Windows Version isn't supported! 184 | echo Please press any Key to continue... 185 | pause >nul 186 | goto exit -------------------------------------------------------------------------------- /Auto Optimization/tasklist.txt: -------------------------------------------------------------------------------- 1 | left4dead2.exe 2 | left4dead.exe 3 | FortniteClient-Win64-Shipping.exe 4 | AT-Win64-Shipping.exe 5 | ShippingPC-RealmGame.exe 6 | Risk of Rain 2.exe 7 | Cemu.exe 8 | sudachi.exe 9 | Ryujinx.exe 10 | xemu.exe 11 | xenia_canary.exe 12 | citra-qt.exe 13 | Dolphin.exe 14 | boiii.exe 15 | BlackOps3.exe 16 | hl2.exe 17 | DOOMEternalx64vk.exe 18 | mcclauncher.exe 19 | PAYDAY3Client-Win64-Shipping.exe 20 | portal2.exe 21 | RDR2.exe 22 | GTA5.exe 23 | Borderlands2.exe -------------------------------------------------------------------------------- /Gaming Optimization Extended (Outdated)/Gaming Optimization Extended.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | title Gaming Optimization Extended 3 | 4 | echo Requesting Admin Permissions... 5 | net session >nul 2>&1 && goto :winver 6 | MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1);close();" 7 | exit /b 8 | 9 | :winver 10 | cls 11 | for /f "tokens=4-6 delims=. " %%i in ('ver') do set VERSION1=%%i.%%j.%%k 12 | if "%version1%" == "10.0.22000" goto start 13 | if "%version1%" == "10.0.22621" goto start 14 | for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION2=%%i.%%j 15 | if "%version2%" == "10.0" goto start 16 | goto not_supported 17 | 18 | :start 19 | cls 20 | color 1f 21 | echo. 22 | echo ///////////////////////////// 23 | echo // crustySenpai's Gaming // 24 | echo // Optimization // 25 | echo ///////////////////////////// 26 | echo. 27 | echo A Script to temporary optimize Windows to increase Performance. 28 | if "%version1%" == "10.0.22000" echo Current Windows Version: 11 (Partly Supported) 29 | if "%version1%" == "10.0.22621" echo Current Windows Version: 11 (Partly Supported) 30 | if "%version2%" == "10.0" echo Current Windows Version: 10 (Supported) 31 | echo. 32 | echo Welcome %username%! 33 | echo. 34 | echo Choose an Option: 35 | echo. 36 | echo 1 = Optimize for Gaming 37 | echo 2 = Revert to default 38 | echo 3 = Exit 39 | echo. 40 | goto select 41 | 42 | :select 43 | set /p c=Select your Option: 44 | if "%c%"=="test" goto test_menu 45 | if "%c%"=="1" goto choose_game 46 | if "%c%"=="2" goto reset 47 | if "%c%"=="3" goto exit 48 | if "%c%" GTR "3" goto select 49 | if "%c%" LSS "1" goto select 50 | 51 | :: ///////////////// 52 | :: // Game List // 53 | :: ///////////////// 54 | 55 | :choose_game 56 | cls 57 | echo. 58 | echo Please select the Game you want to run: 59 | echo. 60 | echo 0 = Back 61 | echo 1 = Optimize without Game 62 | echo 2 = example_game 63 | echo 3 = example_epic 64 | echo 4 = example_steam 65 | echo 5 = example_eac 66 | echo. 67 | goto game_select 68 | 69 | :choose_game_2 70 | cls 71 | echo. 72 | echo Please select the Game you want to run: 73 | echo. 74 | echo 0 = Back 75 | echo 1 = example_game 76 | echo 2 = example_epic 77 | echo 3 = example_steam 78 | echo 4 = example_eac 79 | echo. 80 | goto game_select_2 81 | 82 | :game_select 83 | set /p c=Select your Option: 84 | if "%c%"=="test" goto test_menu 85 | if "%c%"=="0" goto start 86 | if "%c%"=="1" goto optimize 87 | if "%c%"=="2" goto example_game 88 | if "%c%"=="3" goto example_epic 89 | if "%c%"=="4" goto example_steam 90 | if "%c%"=="5" goto set_priority_example_eac 91 | if "%c%" GTR "5" goto game_select 92 | 93 | :game_select_2 94 | set /p c=Select your Option: 95 | if "%c%"=="test" goto test_menu 96 | if "%c%"=="0" cls & goto select_3 97 | if "%c%"=="1" goto example_game_2 98 | if "%c%"=="2" goto example_epic_2 99 | if "%c%"=="3" goto example_steam_2 100 | if "%c%"=="4" goto set_priority_example_eac_2 101 | if "%c%" GTR "4" goto game_select_2 102 | 103 | :: eac protected games we want to first set the priority in registry and then start the game because otherwise we won't be able to change the priority 104 | 105 | :: ///////////// 106 | :: // Menus // 107 | :: ///////////// 108 | 109 | :select_2 110 | echo. 111 | echo Choose an Option: 112 | echo. 113 | echo 1 = Optimize for Gaming 114 | echo 2 = Exit 115 | echo. 116 | goto select_22 117 | 118 | :select_22 119 | set /p c=Select your Option: 120 | if "%c%"=="test" goto test_menu 121 | if "%c%"=="1" goto choose_game 122 | if "%c%"=="2" goto exit 123 | if "%c%" GTR "2" goto select_22 124 | if "%c%" LSS "1" goto select_22 125 | 126 | :select_3 127 | echo. 128 | color 1f 129 | echo Choose an Option: 130 | echo. 131 | echo 1 = Revert to default 132 | echo 2 = Start another Game 133 | echo 3 = Tool Menu 134 | echo 4 = App Menu 135 | echo 5 = Exit 136 | echo. 137 | goto select_33 138 | 139 | :select_33 140 | set /p c=Select your Option: 141 | if "%c%"=="test" goto test_menu 142 | if "%c%"=="1" goto reset 143 | if "%c%"=="2" goto choose_game_2 144 | if "%c%"=="3" goto tool_menu 145 | if "%c%"=="4" goto app_menu 146 | if "%c%"=="5" goto exit_warning 147 | if "%c%" GTR "5" goto select_33 148 | if "%c%" LSS "1" goto select_33 149 | 150 | :tool_menu 151 | cls 152 | echo Select the Program you want to start: 153 | echo. 154 | echo 0 = Back 155 | echo 1 = Resource Monitor 156 | echo 2 = Soundmixer 157 | echo 3 = Task Manager 158 | echo 4 = Command Prompt 159 | echo. 160 | goto tool_select 161 | 162 | :tool_select 163 | set /p c=Select your Option: 164 | if "%c%"=="test" goto test_menu 165 | if "%c%"=="0" cls & goto select_3 166 | if "%c%"=="1" goto resmon 167 | if "%c%"=="2" goto soundmixer 168 | if "%c%"=="3" goto taskmanager 169 | if "%c%"=="4" goto cmd 170 | if "%c%" GTR "4" goto tool_select 171 | 172 | :app_menu 173 | cls 174 | echo. 175 | echo Select the Program you want to start: 176 | echo. 177 | echo 0 = Back 178 | echo 1 = example_program 179 | echo. 180 | goto app_select 181 | 182 | :app_select 183 | set /p c=Select your Option: 184 | if "%c%"=="test" goto test_menu 185 | if "%c%"=="0" cls & goto select_3 186 | if "%c%"=="1" goto example_program 187 | if "%c%" GTR "1" goto app_select 188 | 189 | :: ///////////////////// 190 | :: // Game Startups // 191 | :: ///////////////////// 192 | 193 | :example_game 194 | cls 195 | echo. 196 | echo Starting Example Game (Notepad)... 197 | start "" /D "C:\Windows\System32" "notepad.exe" 198 | echo. 199 | echo Notepad started Successfully! 200 | echo. 201 | goto wait_example_game 202 | 203 | :example_game_2 204 | cls 205 | echo. 206 | echo Starting Example Game (Notepad)... 207 | start "" /D "C:\Windows\System32" "notepad.exe" 208 | echo. 209 | echo Notepad started Successfully! 210 | echo. 211 | goto wait_example_game_2 212 | 213 | :example_epic 214 | cls 215 | echo. 216 | echo Starting Example Game Epic Games (GTA 5) 217 | 218 | :: create a shortcut of your game in epic games and copy the url inside there, look for every % in the id and add a second one so you have it like this %% 219 | :: example "com.epicgames.launcher://apps/0584d2013f0149a791e7b9bad0eec102%3A6e563a2c0f5f46e3b4e88b5f4ed50cca%3A9d2d0eb64d5c44529cece33fe2a46482?action=launch&silent=true" 220 | :: would be "com.epicgames.launcher://apps/0584d2013f0149a791e7b9bad0eec102%%3A6e563a2c0f5f46e3b4e88b5f4ed50cca%%3A9d2d0eb64d5c44529cece33fe2a46482?action=launch&silent=true 221 | 222 | start "" "com.epicgames.launcher://apps/0584d2013f0149a791e7b9bad0eec102%%3A6e563a2c0f5f46e3b4e88b5f4ed50cca%%3A9d2d0eb64d5c44529cece33fe2a46482?action=launch&silent=true" >nul 223 | echo. 224 | echo Grand Theft Auto V started successfully! 225 | echo. 226 | goto wait_example_epic 227 | 228 | :example_epic_2 229 | cls 230 | echo. 231 | echo Starting Example Game Epic Games (GTA 5) 232 | start "" "com.epicgames.launcher://apps/0584d2013f0149a791e7b9bad0eec102%%3A6e563a2c0f5f46e3b4e88b5f4ed50cca%%3A9d2d0eb64d5c44529cece33fe2a46482?action=launch&silent=true" >nul 233 | echo. 234 | echo Grand Theft Auto V started successfully! 235 | echo. 236 | goto wait_example_epic_2 237 | 238 | :example_steam 239 | cls 240 | echo Starting Example Game Steam (CS:GO) 241 | :: replace 500 with the appid of your game 242 | start "C:\Program Files (x86)\Steam\steam.exe" steam://rungameid/500 -no-browser steam://open/minigameslist 243 | echo. 244 | goto wait_example_steam 245 | 246 | :example_steam_2 247 | cls 248 | echo Starting Example Game Steam (CS:GO) 249 | start "C:\Program Files (x86)\Steam\steam.exe" steam://rungameid/500 -no-browser steam://open/minigameslist 250 | echo. 251 | goto wait_example_steam_2 252 | 253 | :example_eac 254 | cls 255 | echo. 256 | echo Starting Example Game Easy Anticheat (Fortnite) 257 | start "" "com.epicgames.launcher://apps/fn%%3A4fe75bbc5a674f4f9b356b5c90567da5%%3AFortnite?action=launch&silent=true" >nul 258 | echo. 259 | echo Fortnite started successfully! 260 | echo. 261 | goto optimize 262 | 263 | :example_eac_2 264 | cls 265 | echo. 266 | echo Starting Example Game Easy Anticheat (Fortnite) 267 | start "" "com.epicgames.launcher://apps/fn%%3A4fe75bbc5a674f4f9b356b5c90567da5%%3AFortnite?action=launch&silent=true" >nul 268 | echo. 269 | echo Fortnite started successfully! 270 | echo. 271 | goto select_3 272 | 273 | 274 | :: /////////////////////////// 275 | :: // Waiting for Process // 276 | :: /////////////////////////// 277 | 278 | :: eac protected games where you set the priority before starting the game don't need that! 279 | 280 | :wait_example_game 281 | tasklist|find "notepad.exe" >nul 282 | if %errorlevel% == 0 goto set_priority_example_game 283 | timeout /t 1 >nul 284 | goto wait_example_game 285 | 286 | :wait_example_game_2 287 | tasklist|find "notepad.exe" >nul 288 | if %errorlevel% == 0 goto set_priority_example_game_2 289 | timeout /t 1 >nul 290 | goto wait_example_game_2 291 | 292 | :wait_example_epic 293 | tasklist|find "GTA5.exe" >nul 294 | if %errorlevel% == 0 goto set_priority_example_epic 295 | timeout /t 1 >nul 296 | goto wait_example_epic 297 | 298 | :wait_example_epic_2 299 | tasklist|find "GTA5.exe" >nul 300 | if %errorlevel% == 0 goto set_priority_example_epic_2 301 | timeout /t 1 >nul 302 | goto wait_example_epic_2 303 | 304 | :wait_example_game_steam 305 | tasklist|find "csgo.exe" >nul 306 | if %errorlevel% == 0 goto set_priority_example_steam 307 | timeout /t 1 >nul 308 | goto wait_example_steam 309 | 310 | :wait_example_steam_2 311 | tasklist|find "csgo.exe" >nul 312 | if %errorlevel% == 0 goto set_priority_example_steam_2 313 | timeout /t 1 >nul 314 | goto wait_example_steam_2 315 | 316 | :: ///////////////////// 317 | :: // Priority Echos // 318 | :: ///////////////////// 319 | 320 | :set_priority_example_game 321 | cls 322 | echo. 323 | echo What Priority you want the Game to run at? 324 | echo. 325 | echo 1 = Realtime (unstable) 326 | echo 2 = High (recommended) 327 | echo 3 = Above Normal 328 | echo 4 = Normal (default) 329 | echo 5 = Below Normal 330 | echo 6 = Low 331 | echo. 332 | goto priority_select_example_game 333 | 334 | :set_priority_example_game_2 335 | cls 336 | echo. 337 | echo What Priority you want the Game to run at? 338 | echo. 339 | echo 1 = Realtime (unstable) 340 | echo 2 = High (recommended) 341 | echo 3 = Above Normal 342 | echo 4 = Normal (default) 343 | echo 5 = Below Normal 344 | echo 6 = Low 345 | echo. 346 | goto priority_select_example_game_2 347 | 348 | :set_priority_example_epic 349 | cls 350 | echo. 351 | echo What Priority you want the Game to run at? 352 | echo. 353 | echo 1 = Realtime (unstable) 354 | echo 2 = High (recommended) 355 | echo 3 = Above Normal 356 | echo 4 = Normal (default) 357 | echo 5 = Below Normal 358 | echo 6 = Low 359 | echo. 360 | goto priority_select_example_epic 361 | 362 | :set_priority_example_epic_2 363 | cls 364 | echo. 365 | echo What Priority you want the Game to run at? 366 | echo. 367 | echo 1 = Realtime (unstable) 368 | echo 2 = High (recommended) 369 | echo 3 = Above Normal 370 | echo 4 = Normal (default) 371 | echo 5 = Below Normal 372 | echo 6 = Low 373 | echo. 374 | goto priority_select_example_epic_2 375 | 376 | :set_priority_example_steam 377 | cls 378 | echo. 379 | echo What Priority you want the Game to run at? 380 | echo. 381 | echo 1 = Realtime (unstable) 382 | echo 2 = High (recommended) 383 | echo 3 = Above Normal 384 | echo 4 = Normal (default) 385 | echo 5 = Below Normal 386 | echo 6 = Low 387 | echo. 388 | goto priority_select_example_steam 389 | 390 | :set_priority_example_steam_2 391 | cls 392 | echo. 393 | echo What Priority you want the Game to run at? 394 | echo. 395 | echo 1 = Realtime (unstable) 396 | echo 2 = High (recommended) 397 | echo 3 = Above Normal 398 | echo 4 = Normal (default) 399 | echo 5 = Below Normal 400 | echo 6 = Low 401 | echo. 402 | goto priority_select_example_steam_2 403 | 404 | :set_priority_example_eac 405 | cls 406 | echo. 407 | echo What Priority you want the Game to run at? 408 | echo. 409 | echo 1 = Realtime (unstable) 410 | echo 2 = High (recommended) 411 | echo 3 = Above Normal 412 | echo 4 = Normal (default) 413 | echo 5 = Below Normal 414 | echo 6 = Low 415 | echo. 416 | goto priority_select_example_eac 417 | 418 | :set_priority_example_eac_2 419 | cls 420 | echo. 421 | echo What Priority you want the Game to run at? 422 | echo. 423 | echo 1 = Realtime (unstable) 424 | echo 2 = High (recommended) 425 | echo 3 = Above Normal 426 | echo 4 = Normal (default) 427 | echo 5 = Below Normal 428 | echo 6 = Low 429 | echo. 430 | goto priority_select_example_eac_2 431 | 432 | :: //////////////////////// 433 | :: // Priority Choices // 434 | :: //////////////////////// 435 | 436 | :priority_select_example_game 437 | set /p c=Select your Option: 438 | if "%c%"=="test" goto test_menu 439 | if "%c%"=="1" goto example_game_p_rt 440 | if "%c%"=="2" goto example_game_p_high 441 | if "%c%"=="3" goto example_game_p_anormal 442 | if "%c%"=="4" goto example_game_p_normal 443 | if "%c%"=="5" goto example_game_p_bnormal 444 | if "%c%"=="6" goto example_game_p_low 445 | if "%c%" GTR "6" goto priority_select_example_game 446 | if "%c%" LSS "1" goto priority_select_example_game 447 | 448 | :priority_select_example_game_2 449 | set /p c=Select your Option: 450 | if "%c%"=="test" goto test_menu 451 | if "%c%"=="1" goto example_game_p_rt_2 452 | if "%c%"=="2" goto example_game_p_high_2 453 | if "%c%"=="3" goto example_game_p_anormal_2 454 | if "%c%"=="4" goto example_game_p_normal_2 455 | if "%c%"=="5" goto example_game_p_bnormal_2 456 | if "%c%"=="6" goto example_game_p_low_2 457 | if "%c%" GTR "6" goto priority_select_example_game_2 458 | if "%c%" LSS "1" goto priority_select_example_game_2 459 | 460 | :priority_select_example_epic 461 | set /p c=Select your Option: 462 | if "%c%"=="test" goto test_menu 463 | if "%c%"=="1" goto example_epic_p_rt 464 | if "%c%"=="2" goto example_epic_p_high 465 | if "%c%"=="3" goto example_epic_p_anormal 466 | if "%c%"=="4" goto example_epic_p_normal 467 | if "%c%"=="5" goto example_epic_p_bnormal 468 | if "%c%"=="6" goto example_epic_p_low 469 | if "%c%" GTR "6" goto priority_select_example_epic 470 | if "%c%" LSS "1" goto priority_select_example_epic 471 | 472 | :priority_select_example_epic_2 473 | set /p c=Select your Option: 474 | if "%c%"=="test" goto test_menu 475 | if "%c%"=="1" goto example_epic_p_rt_2 476 | if "%c%"=="2" goto example_epic_p_high_2 477 | if "%c%"=="3" goto example_epic_p_anormal_2 478 | if "%c%"=="4" goto example_epic_p_normal_2 479 | if "%c%"=="5" goto example_epic_p_bnormal_2 480 | if "%c%"=="6" goto example_epic_p_low_2 481 | if "%c%" GTR "6" goto priority_select_example_epic_2 482 | if "%c%" LSS "1" goto priority_select_example_epic_2 483 | 484 | :priority_select_example_steam 485 | set /p c=Select your Option: 486 | if "%c%"=="test" goto test_menu 487 | if "%c%"=="1" goto example_steam_p_rt 488 | if "%c%"=="2" goto example_steam_p_high 489 | if "%c%"=="3" goto example_steam_p_anormal 490 | if "%c%"=="4" goto example_steam_p_normal 491 | if "%c%"=="5" goto example_steam_p_bnormal 492 | if "%c%"=="6" goto example_steam_p_low 493 | if "%c%" GTR "6" goto priority_select_example_steam 494 | if "%c%" LSS "1" goto priority_select_example_steam 495 | 496 | :priority_select_example_steam_2 497 | set /p c=Select your Option: 498 | if "%c%"=="test" goto test_menu 499 | if "%c%"=="1" goto example_steam_p_rt_2 500 | if "%c%"=="2" goto example_steam_p_high_2 501 | if "%c%"=="3" goto example_steam_p_anormal_2 502 | if "%c%"=="4" goto example_steam_p_normal_2 503 | if "%c%"=="5" goto example_steam_p_bnormal_2 504 | if "%c%"=="6" goto example_steam_p_low_2 505 | if "%c%" GTR "6" goto priority_select_example_steam_2 506 | if "%c%" LSS "1" goto priority_select_example_steam_2 507 | 508 | :priority_select_example_eac 509 | set /p c=Select your Option: 510 | if "%c%"=="test" goto test_menu 511 | if "%c%"=="1" goto example_eac_p_rt 512 | if "%c%"=="2" goto example_eac_p_high 513 | if "%c%"=="3" goto example_eac_p_anormal 514 | if "%c%"=="4" goto example_eac_p_normal 515 | if "%c%"=="5" goto example_eac_p_bnormal 516 | if "%c%"=="6" goto example_eac_p_low 517 | if "%c%" GTR "6" goto priority_select_example_eac 518 | if "%c%" LSS "1" goto priority_select_example_eac 519 | 520 | :priority_select_example_eac_2 521 | set /p c=Select your Option: 522 | if "%c%"=="test" goto test_menu 523 | if "%c%"=="1" goto example_eac_p_rt_2 524 | if "%c%"=="2" goto example_eac_p_high_2 525 | if "%c%"=="3" goto example_eac_p_anormal_2 526 | if "%c%"=="4" goto example_eac_p_normal_2 527 | if "%c%"=="5" goto example_eac_p_bnormal_2 528 | if "%c%"=="6" goto example_eac_p_low_2 529 | if "%c%" GTR "6" goto priority_select_example_eac_2 530 | if "%c%" LSS "1" goto priority_select_example_eac_2 531 | 532 | :: //////////////////////// 533 | :: // Process Priority // 534 | :: //////////////////////// 535 | 536 | :: Priority Values: low = 64, below normal = 16384, normal = 32, above normal = 32768, high = 128, realtime = 256 537 | :: Priority Values registry: low = 1, below normal = 5, normal = 2, above normal = 6, high = 3, realtime = 4 538 | 539 | :: -----------------------example_game----------------------------- 540 | 541 | :example_game_p_rt 542 | wmic process where name="notepad.exe" CALL setpriority "256" >nul 543 | goto priority_done 544 | 545 | :example_game_p_high 546 | wmic process where name="notepad.exe" CALL setpriority "128" >nul 547 | goto priority_done 548 | 549 | :example_game_p_anormal 550 | wmic process where name="notepad.exe" CALL setpriority "32768" >nul 551 | goto priority_done 552 | 553 | :example_game_p_normal 554 | wmic process where name="notepad.exe" CALL setpriority "32" >nul 555 | goto priority_done 556 | 557 | :example_game_p_bnormal 558 | wmic process where name="notepad.exe" CALL setpriority "16384" >nul 559 | goto priority_done 560 | 561 | :example_game_p_low 562 | wmic process where name="notepad.exe" CALL setpriority "64" >nul 563 | goto priority_done 564 | 565 | :example_game_p_rt_2 566 | wmic process where name="notepad.exe" CALL setpriority "256" >nul 567 | goto priority_done_2 568 | 569 | :example_game_p_high_2 570 | wmic process where name="notepad.exe" CALL setpriority "128" >nul 571 | goto priority_done_2 572 | 573 | :example_game_p_anormal_2 574 | wmic process where name="notepad.exe" CALL setpriority "32768" >nul 575 | goto priority_done_2 576 | 577 | :example_game_p_normal_2 578 | wmic process where name="notepad.exe" CALL setpriority "32" >nul 579 | goto priority_done_2 580 | 581 | :example_game_p_bnormal_2 582 | wmic process where name="notepad.exe" CALL setpriority "16384" >nul 583 | goto priority_done_2 584 | 585 | :example_game_p_low_2 586 | wmic process where name="notepad.exe" CALL setpriority "64" >nul 587 | goto priority_done_2 588 | 589 | :: -----------------------example_epic----------------------------- 590 | 591 | :example_epic_p_rt 592 | wmic process where name="GTA5.exe" CALL setpriority "256" >nul 593 | goto priority_done 594 | 595 | :example_epic_p_high 596 | wmic process where name="GTA5.exe" CALL setpriority "128" >nul 597 | goto priority_done 598 | 599 | :example_epic_p_anormal 600 | wmic process where name="GTA5.exe" CALL setpriority "32768" >nul 601 | goto priority_done 602 | 603 | :example_epic_p_normal 604 | wmic process where name="GTA5.exe" CALL setpriority "32" >nul 605 | goto priority_done 606 | 607 | :example_epic_p_bnormal 608 | wmic process where name="GTA5.exe" CALL setpriority "16384" >nul 609 | goto priority_done 610 | 611 | :example_epic_p_low 612 | wmic process where name="GTA5.exe" CALL setpriority "64" >nul 613 | goto priority_done 614 | 615 | :example_epic_p_rt_2 616 | wmic process where name="GTA5.exe" CALL setpriority "256" >nul 617 | goto priority_done_2 618 | 619 | :example_epic_p_high_2 620 | wmic process where name="GTA5.exe" CALL setpriority "128" >nul 621 | goto priority_done_2 622 | 623 | :example_epic_p_anormal_2 624 | wmic process where name="GTA5.exe" CALL setpriority "32768" >nul 625 | goto priority_done_2 626 | 627 | :example_epic_p_normal_2 628 | wmic process where name="GTA5.exe" CALL setpriority "32" >nul 629 | goto priority_done_2 630 | 631 | :example_epic_p_bnormal_2 632 | wmic process where name="GTA5.exe" CALL setpriority "16384" >nul 633 | goto priority_done_2 634 | 635 | :example_epic_p_low_2 636 | wmic process where name="GTA5.exe" CALL setpriority "64" >nul 637 | goto priority_done_2 638 | 639 | :: -----------------------example_steam----------------------------- 640 | 641 | :example_steam_p_rt 642 | wmic process where name="csgo.exe" CALL setpriority "256" >nul 643 | goto priority_done 644 | 645 | :example_steam_p_high 646 | wmic process where name="csgo.exe" CALL setpriority "128" >nul 647 | goto priority_done 648 | 649 | :example_steam_p_anormal 650 | wmic process where name="csgo.exe" CALL setpriority "32768" >nul 651 | goto priority_done 652 | 653 | :example_steam_p_normal 654 | wmic process where name="csgo.exe" CALL setpriority "32" >nul 655 | goto priority_done 656 | 657 | :example_steam_p_bnormal 658 | wmic process where name="csgo.exe" CALL setpriority "16384" >nul 659 | goto priority_done 660 | 661 | :example_steam_p_low 662 | wmic process where name="csgo.exe" CALL setpriority "64" >nul 663 | goto priority_done 664 | 665 | :example_steam_p_rt_2 666 | wmic process where name="csgo.exe" CALL setpriority "256" >nul 667 | goto priority_done_2 668 | 669 | :example_steam_p_high_2 670 | wmic process where name="csgo.exe" CALL setpriority "128" >nul 671 | goto priority_done_2 672 | 673 | :example_steam_p_anormal_2 674 | wmic process where name="csgo.exe" CALL setpriority "32768" >nul 675 | goto priority_done_2 676 | 677 | :example_steam_p_normal_2 678 | wmic process where name="csgo.exe" CALL setpriority "32" >nul 679 | goto priority_done_2 680 | 681 | :example_steam_p_bnormal_2 682 | wmic process where name="csgo.exe" CALL setpriority "16384" >nul 683 | goto priority_done_2 684 | 685 | :example_steam_p_low_2 686 | wmic process where name="csgo.exe" CALL setpriority "64" >nul 687 | goto priority_done_2 688 | 689 | rem -----------------------example_eac----------------------------- 690 | 691 | :example_eac_p_rt 692 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 4 /F 693 | goto example_eac 694 | 695 | :example_eac_p_high 696 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /F 697 | goto example_eac 698 | 699 | :example_eac_p_anormal 700 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 6 /F 701 | goto example_eac 702 | 703 | :example_eac_p_normal 704 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 2 /F 705 | goto example_eac 706 | 707 | :example_eac_p_bnormal 708 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 5 /F 709 | goto example_eac 710 | 711 | :example_eac_p_low 712 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 1 /F 713 | goto example_eac 714 | 715 | :example_eac_p_rt_2 716 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 4 /F 717 | goto example_eac_2 718 | 719 | :example_eac_p_high_2 720 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /F 721 | goto example_eac_2 722 | 723 | :example_eac_p_anormal_2 724 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 6 /F 725 | goto example_eac_2 726 | 727 | :example_eac_p_normal_2 728 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 2 /F 729 | goto example_eac_2 730 | 731 | :example_eac_p_bnormal_2 732 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 5 /F 733 | goto example_eac_2 734 | 735 | :example_eac_p_low_2 736 | reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 1 /F 737 | goto example_eac_2 738 | 739 | :: ///////////////////// 740 | :: // Priority Done // 741 | :: ///////////////////// 742 | 743 | :priority_done 744 | cls 745 | echo. 746 | echo Priority successfully changed! 747 | echo. 748 | goto optimize 749 | 750 | :: ///////////////////////// 751 | :: // Optimize & Revert // 752 | :: ///////////////////////// 753 | 754 | :optimize 755 | cls 756 | echo. 757 | echo Starting the Optimization. 758 | echo. 759 | echo This may take some time... 760 | echo. 761 | timeout /t 1 -nobreak >nul 762 | 763 | :: you can also use the ultimate performance powerplan, to unlock it run a Command Prompt as admin and run the following: powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 764 | :: now copy the GUID you get and replace it with the one here 765 | echo Switching to the High Performance Powerplan... 766 | powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 767 | echo. 768 | echo Powerplan successfully switched! 769 | echo. 770 | 771 | :: you can aswell add an overclock to your gpu if MSI Afterburner is installed and all profiles are set (example here profile 1 has the oc and 2 the stocksettings to revert the oc)! 772 | echo. 773 | echo Overclocking the GPU... 774 | echo. 775 | start "" "C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe" -Profile1 776 | timeout /t 5 /nobreak >nul 777 | taskkill /F /IM "MSIAfterburner.exe" >nul 778 | taskkill /F /IM "RTSS.exe" 779 | taskkill /F /IM "RTSSHooksLoader64.exe" 780 | taskkill /F /IM "EncoderServer.exe" 781 | echo. 782 | echo Done! 783 | echo. 784 | 785 | :: you can use Intelligent Standby List Cleaner if installed to free up ram in the background and improve latency! Recommended Settings you can find on my Github Page. 786 | echo Starting Intelligent standby list cleaner (ISLC) 787 | echo. 788 | start "" /D "C:\Program Files\Intelligent standby list cleaner" "Intelligent standby list cleaner ISLC.exe" -minimized 789 | echo Done! 790 | echo. 791 | 792 | echo Disable/Killing Services... 793 | echo. 794 | sc config "seclogon" start= disabled 795 | sc config "CDPSvc" start= disabled 796 | sc config "CscService" start= disabled 797 | sc config "PhoneSvc" start= disabled 798 | sc config "Fax" start= disabled 799 | sc config "InstallService" start= disabled 800 | sc config "icssvc" start= disabled 801 | sc config "SEMgrSvc" start= disabled 802 | sc config "SmsRouter" start= disabled 803 | sc config "Spooler" start= disabled 804 | sc config "SysMain" start= disabled 805 | sc config "WpnService" start= disabled 806 | sc config "WSearch" start= disabled 807 | sc config "stisvc" start= disabled 808 | sc config "TabletInputService" start= disabled 809 | sc config "DiagTrack" start= disabled 810 | sc config "MapsBroker" start= disabled 811 | sc config "CertPropSvc" start= disabled 812 | sc config "WbioSrvc" start= disabled 813 | sc config "wuauserv" start= disabled 814 | sc config "BDESVC" start= disabled 815 | sc config "DPS" start= disabled 816 | sc config "fhsvc" start= disabled 817 | sc config "SharedAccess" start= disabled 818 | sc config "Netlogon" start= disabled 819 | sc config "PcaSvc" start= disabled 820 | sc config "WpcMonSvc" start= disabled 821 | sc config "lmhosts" start= disabled 822 | sc config "WerSvc" start= disabled 823 | sc config "FrameServer" start= disabled 824 | sc config "wisvc" start= disabled 825 | sc config "VaultSvc" start= disabled 826 | sc config "BTAGService" start= disabled 827 | sc config "DusmSvc" start= disabled 828 | sc config "DoSvc" start= disabled 829 | sc config "dmwappushservice" start= disabled 830 | sc config "lfsvc" start= disabled 831 | sc config "NcdAutoSetup" start= disabled 832 | sc config "QWAVE" start= disabled 833 | sc config "RmSvc" start= disabled 834 | sc config "RasMan" start= disabled 835 | sc config "RasAuto" start= disabled 836 | sc config "ScDeviceEnum" start= disabled 837 | sc config "SCardSvr" start= disabled 838 | sc config "TapiSrv" start= disabled 839 | sc config "DispBrokerDesktopSvc" start= disabled 840 | sc config "LanmanServer" start= disabled 841 | sc config "LanmanWorkstation" start= disabled 842 | sc config "SENS" start= disabled 843 | sc config "fdPHost" start= disabled 844 | sc config "FDResPub" start= disabled 845 | sc stop "seclogon" 846 | sc stop "CDPSvc" 847 | sc stop "CscService" 848 | sc stop "PhoneSvc" 849 | sc stop "Fax" 850 | sc stop "InstallService" 851 | sc stop "icssvc" 852 | sc stop "SEMgrSvc" 853 | sc stop "SmsRouter" 854 | sc stop "Spooler" 855 | sc stop "SysMain" 856 | sc stop "WpnService" 857 | sc stop "WSearch" 858 | sc stop "stisvc" 859 | sc stop "TabletInputService" 860 | sc stop "DiagTrack" 861 | sc stop "MapsBroker" 862 | sc stop "CertPropSvc" 863 | sc stop "WbioSrvc" 864 | sc stop "wuauserv" 865 | sc stop "BDESVC" 866 | sc stop "DPS" 867 | sc stop "fhsvc" 868 | sc stop "SharedAccess" 869 | sc stop "Netlogon" 870 | sc stop "PcaSvc" 871 | sc stop "WpcMonSvc" 872 | sc stop "lmhosts" 873 | sc stop "WerSvc" 874 | sc stop "FrameServer" 875 | sc stop "wisvc" 876 | sc stop "VaultSvc" 877 | sc stop "BTAGService" 878 | sc stop "DusmSvc" 879 | sc stop "DoSvc" 880 | sc stop "dmwappushservice" 881 | sc stop "lfsvc" 882 | sc stop "NcdAutoSetup" 883 | sc stop "QWAVE" 884 | sc stop "RmSvc" 885 | sc stop "RasMan" 886 | sc stop "RasAuto" 887 | sc stop "ScDeviceEnum" 888 | sc stop "SCardSvr" 889 | sc stop "TapiSrv" 890 | sc stop "DispBrokerDesktopSvc" 891 | sc stop "LanmanServer" 892 | sc stop "LanmanWorkstation" 893 | sc stop "SENS" 894 | sc stop "fdpHost" 895 | sc stop "FDResPub" 896 | echo. 897 | echo Done! 898 | echo. 899 | 900 | echo killing Tasks.. 901 | echo. 902 | taskkill /F /IM "explorer.exe" 903 | taskkill /F /IM "Microsoft.Photos.exe" 904 | taskkill /F /IM "WinStore.App.exe" 905 | taskkill /F /IM "TaskInputHost.exe" 906 | taskkill /F /IM "ShellExperienceHost.exe" 907 | taskkill /F /IM "GameBarPresenceWriter.exe" 908 | taskkill /F /IM "atieclxx.exe" 909 | taskkill /F /IM "RtkNGUI64.exe" 910 | taskkill /F /IM "spoolsv.exe" 911 | echo. 912 | echo Done! 913 | echo. 914 | 915 | echo Lowering Prioritys... 916 | echo. 917 | wmic process where name="chrome.exe" CALL setpriority "16384" 918 | wmic process where name="firefox.exe" CALL setpriority "16384" 919 | wmic process where name="steam.exe" CALL setpriority "64" 920 | wmic process where name="steamservice.exe" CALL setpriority "64" 921 | wmic process where name="steamwebhelper.exe" CALL setpriority "64" 922 | wmic process where name="GameOverlayUI.exe" CALL setpriority "64" 923 | wmic process where name="EpicGamesLauncher.exe" CALL setpriority "64" 924 | wmic process where name="EpicWebHelper.exe" CALL setpriority "64" 925 | 926 | echo. 927 | echo Done! 928 | echo. 929 | 930 | echo Emptying the Recycle Bin... 931 | echo. 932 | :: here you can add more drives if available just copy the command and replace C with your drive letter 933 | rd /s /q C:\$Recycle.bin 934 | echo. 935 | echo Done! 936 | echo. 937 | 938 | echo Emptying the Prefetch, Temp and SoftwareDistribution download Folders... 939 | echo. 940 | cd "C:\Windows\" 941 | del "Prefetch" /S /Q /F 942 | del "Temp" /S /Q 943 | rmdir /S /Q "Prefetch" 944 | mkdir "Prefetch" 945 | cd "C:\Windows\SoftwareDistribution" 946 | del "Download" /S /Q 947 | rmdir /S /Q "Download" 948 | mkdir "Download" 949 | cd "%localappdata%" 950 | del "Temp" /S /Q 951 | rmdir /S /Q "Temp" 952 | mkdir "Temp" 953 | cd C:\Windows\System32 954 | echo. 955 | echo Done! 956 | echo. 957 | 958 | :: if you're able to disable hpet in your bios you don't need this (makes devcon useless)! 959 | echo Disable HPET... 960 | echo. 961 | set HARDWARE_ID="ACPI\VEN_PNP&DEV_0103" 962 | cd "%~dp0\Tools" 963 | devcon /r disable *PNP0103 964 | echo. 965 | echo Done! 966 | 967 | echo Flushing DNS... 968 | ipconfig/flushDNS 969 | echo Done! 970 | 971 | cls 972 | echo. 973 | echo Optimization Successfull! 974 | goto select_3 975 | 976 | :reset 977 | cls 978 | echo. 979 | echo Starting to revert everything. 980 | echo This may take some time... 981 | echo. 982 | 983 | echo Switching to Balanced Powerplan... 984 | powercfg /s 381b4222-f694-41f0-9685-ff5bb260df2e 985 | echo. 986 | echo Powerplan successfully switched! 987 | echo. 988 | 989 | echo Underclocking the GPU to default... 990 | start "" "C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe" -Profile2 >nul 991 | timeout /t 5 /nobreak >nul 992 | taskkill /F /IM "MSIAfterburner.exe" 993 | taskkill /F /IM "RTSS.exe" 994 | taskkill /F /IM "RTSSHooksLoader64.exe" 995 | taskkill /F /IM "EncoderServer.exe" 996 | echo. 997 | echo Done! 998 | echo. 999 | 1000 | echo Closing Intelligent standby list cleaner (ISLC) 1001 | echo. 1002 | taskkill /F /IM "Intelligent standby list cleaner ISLC.exe" 1003 | echo Done! 1004 | echo. 1005 | 1006 | echo Enabling Tasks... 1007 | echo. 1008 | start explorer.exe 1009 | echo. 1010 | echo Done! 1011 | echo. 1012 | 1013 | echo Enabling Services... 1014 | echo. 1015 | sc config "seclogon" start= demand 1016 | sc config "CDPSvc" start= delayed-auto 1017 | sc config "CscService" start= demand 1018 | sc config "PhoneSvc" start= demand 1019 | sc config "Fax" start= demand 1020 | sc config "InstallService" start= demand 1021 | sc config "icssvc" start= demand 1022 | sc config "SEMgrSvc" start= demand 1023 | sc config "SmsRouter" start= demand 1024 | sc config "Spooler" start= auto 1025 | sc config "SysMain" start= auto 1026 | sc config "WpnService" start= auto 1027 | sc config "WSearch" start= delayed-auto 1028 | sc config "stisvc" start= auto 1029 | sc config "TabletInputService" start= demand 1030 | sc config "DiagTrack" start= auto 1031 | sc config "MapsBroker" start= delayed-auto 1032 | sc config "CertPropSvc" start= demand 1033 | sc config "WbioSrvc" start= demand 1034 | sc config "wuauserv" start= demand 1035 | sc config "BDESVC" start= demand 1036 | sc config "DPS" start= auto 1037 | sc config "fhsvc" start= demand 1038 | sc config "SharedAccess" start= demand 1039 | sc config "Netlogon" start= demand 1040 | sc config "PcaSvc" start= demand 1041 | sc config "WpcMonSvc" start= demand 1042 | sc config "lmhosts" start= demand 1043 | sc config "WerSvc" start= demand 1044 | sc config "FrameServer" start= demand 1045 | sc config "wisvc" start= demand 1046 | sc config "VaultSvc" start= demand 1047 | sc config "BTAGService" start= demand 1048 | sc config "DusmSvc" start= auto 1049 | sc config "DoSvc" start= auto 1050 | sc config "dmwappushservice" start= demand 1051 | sc config "lfsvc" start= demand 1052 | sc config "NcdAutoSetup" start= demand 1053 | sc config "QWAVE" start= demand 1054 | sc config "RmSvc" start= demand 1055 | sc config "RasMan" start= auto 1056 | sc config "RasAuto" start= demand 1057 | sc config "RemoteAccess" start= disabled 1058 | sc config "ScDeviceEnum" start= demand 1059 | sc config "SCardSvr" start= demand 1060 | sc config "TapiSrv" start= demand 1061 | sc config "DispBrokerDesktopSvc" start= auto 1062 | sc config "LanmanServer" start= auto 1063 | sc config "LanmanWorkstation" start= auto 1064 | sc config "SENS" start= auto 1065 | sc config "fdPHost" start= demand 1066 | sc config "FDResPub" start= demand 1067 | sc start "CDPSvc" 1068 | sc start "InstallService" 1069 | sc start "SEMgrSvc" 1070 | sc start "Spooler" 1071 | sc start "SysMain" 1072 | sc start "WpnService" 1073 | sc start "WSearch" 1074 | sc start "stisvc" 1075 | sc start "TabletInputService" 1076 | sc start "DiagTrack" 1077 | sc start "WbioSrvc" 1078 | sc start "DPS" 1079 | sc start "PcaSvc" 1080 | sc start "lmhosts" 1081 | sc start "VaultSvc" 1082 | sc start "DusmSvc" 1083 | sc start "QWAVE" 1084 | sc start "RmSvc" 1085 | sc start "RasMan" 1086 | sc start "TapiSrv" 1087 | sc start "DispBrokerDesktopSvc" 1088 | sc start "LanmanServer" 1089 | sc start "LanmanWorkstation" 1090 | sc start "SENS" 1091 | sc start "fdpHost" 1092 | sc start "FDResPub" 1093 | echo. 1094 | echo Done! 1095 | echo. 1096 | 1097 | echo Revert Priority changes... 1098 | echo. 1099 | wmic process where name="chrome.exe" CALL setpriority "32" 1100 | wmic process where name="firefox.exe" CALL setpriority "32" 1101 | wmic process where name="steam.exe" CALL setpriority "32" 1102 | wmic process where name="steamservice.exe" CALL setpriority "32" 1103 | wmic process where name="steamwebhelper.exe" CALL setpriority "32" 1104 | wmic process where name="EpicGamesLauncher.exe" CALL setpriority "32" 1105 | wmic process where name="EpicWebHelper.exe" CALL setpriority "32" 1106 | echo. 1107 | echo Done! 1108 | echo. 1109 | 1110 | echo Enable HPET... 1111 | echo. 1112 | set HARDWARE_ID="ACPI\VEN_PNP&DEV_0103" 1113 | cd "%~dp0\Tools" 1114 | devcon /r enable *PNP0103 1115 | echo. 1116 | echo Done! 1117 | 1118 | :: removes the registry entry we made to run eac games with changed priority 1119 | reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FortniteClient-Win64-Shipping.exe" /F 1120 | goto reset_done 1121 | 1122 | cls 1123 | echo. 1124 | echo Settings reverted to default! 1125 | goto select_2 1126 | 1127 | :: ///////////////// 1128 | :: // Test Menu // 1129 | :: ///////////////// 1130 | 1131 | :test_menu 1132 | cls 1133 | echo. 1134 | echo Menu for Testing 1135 | echo. 1136 | echo Please select an option: 1137 | echo. 1138 | echo 0 = Go Back to start 1139 | echo 1 = choose_game 1140 | echo 2 = choose_game_2 1141 | echo 3 = select_2 1142 | echo 4 = select_3 1143 | echo 5 = tool_menu 1144 | echo 6 = app_menu 1145 | echo 7 = test_priority 1146 | echo 8 = exit_warning 1147 | echo. 1148 | goto test_select 1149 | 1150 | :test_select 1151 | set /p c=Select your Option: 1152 | if "%c%"=="0" goto start 1153 | if "%c%"=="1" goto choose_game 1154 | if "%c%"=="2" goto choose_game_2 1155 | if "%c%"=="3" cls & goto select_2 1156 | if "%c%"=="4" cls & goto select_3 1157 | if "%c%"=="5" goto tool_menu 1158 | if "%c%"=="6" goto app_menu 1159 | if "%c%"=="7" goto test_priority 1160 | if "%c%"=="8" goto exit_warning 1161 | if "%c%" GTR "8" goto tool_select 1162 | 1163 | :test_priority 1164 | cls 1165 | echo. 1166 | echo Select an Priority Menu: 1167 | echo. 1168 | echo 1 = set_priority_example_game 1169 | echo 2 = set_priority_example_game_2 1170 | echo. 1171 | goto test_priority_select 1172 | 1173 | :test_priority_select 1174 | set /p c=Select your Option: 1175 | if "%c%"=="test" goto test_menu 1176 | if "%c%"=="1" goto set_priority_example_game 1177 | if "%c%"=="2" goto set_priority_example_game_2 1178 | if "%c%" LSS "1" goto test_priority_select 1179 | if "%c%" GTR "2" goto test_priority_select 1180 | 1181 | :: ////////////////////////////// 1182 | :: // Tools and App Startups // 1183 | :: ////////////////////////////// 1184 | 1185 | :example_program 1186 | echo Starting Notepad... 1187 | start "" /D "C:\Windows\System32" "notepad.exe" 1188 | cls 1189 | echo. 1190 | echo Notepad started successfully! 1191 | goto select_3 1192 | 1193 | :taskmanager 1194 | echo Starting Taskmanager... 1195 | start taskmgr 1196 | cls 1197 | echo. 1198 | echo Taskmanager started successfully! 1199 | goto select_3 1200 | 1201 | :resmon 1202 | echo Starting Resource Monitor... 1203 | start resmon 1204 | cls 1205 | echo. 1206 | echo Resource Monitor started successfully! 1207 | goto select_3 1208 | 1209 | :cmd 1210 | echo Starting Command Prompt... 1211 | start cmd 1212 | cls 1213 | echo. 1214 | echo Command Prompt started successfully! 1215 | goto select_3 1216 | 1217 | :soundmixer 1218 | echo Starting Soundmixer... 1219 | start sndvol 1220 | cls 1221 | echo. 1222 | echo Soundmixer started successfully! 1223 | goto select_3 1224 | 1225 | :: /////////////////// 1226 | :: // other stuff // 1227 | :: /////////////////// 1228 | 1229 | :not_supported 1230 | cls 1231 | echo. 1232 | echo Your current Windows Version isn't supported! 1233 | echo Please press any Key to continue... 1234 | pause >nul 1235 | goto exit 1236 | 1237 | :exit_warning 1238 | cls 1239 | color 40 1240 | echo. 1241 | echo WARNING! When exiting now you can only start the script again by starting explorer.exe in Taskmanager! Are you sure? 1242 | echo. 1243 | echo 0 = No / 1 = Yes: 1244 | echo. 1245 | goto exit_proceed 1246 | 1247 | :exit_proceed 1248 | set /p c=Proceed? = 1249 | if "%c%"=="test" goto test_menu 1250 | if "%c%"=="0" cls & goto select_3 1251 | if "%c%"=="1" goto exit 1252 | if "%c%" GTR "1" goto exit_proceed 1253 | 1254 | :exit 1255 | exit 1256 | -------------------------------------------------------------------------------- /Gaming Optimization/Gaming Optimization.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | title Gaming Optimization 3 | 4 | :: request admin permission 5 | echo Checking for Admin Permissions... 6 | if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b) 7 | cd "%~dp0" 8 | 9 | :winver 10 | :: checking if the build number is higher than 10.0.26100 to see if it's 11 and less than 10.0.10240 for anything before 10 11 | for /f "tokens=4-6 delims=.] " %%i in ('ver') do set VERSION=%%i%%j%%k 12 | if %version% GTR 10026100 (set osver=Windows 11 - Supported) else (set osver=Windows 10 - Supported) 13 | if %version% LSS 10010240 goto not_supported 14 | 15 | :start 16 | color 1f 17 | cls & echo. 18 | echo ///////////////////////// 19 | echo // Gaming Optimization // 20 | echo ///////////////////////// 21 | echo. 22 | echo A Script to temporary optimize Windows for a better Gaming Experience. 23 | echo. 24 | echo Current OS: %osver% 25 | echo Welcome %username%. 26 | echo. 27 | echo Choose an Option: 28 | echo. 29 | echo 1 = Optimize for Gaming 30 | echo 2 = Revert to default 31 | echo 3 = Exit 32 | echo. 33 | set /p c=Select your Option: 34 | if "%c%"=="test" goto test_menu 35 | if "%c%"=="1" goto optimize 36 | if "%c%"=="2" goto reset 37 | if "%c%"=="3" exit 38 | if "%c%" GTR "3" goto start 39 | if "%c%" LSS "1" goto start 40 | 41 | :select_2 42 | :: back menu which shows up after reverting everything to normal 43 | cls & echo. 44 | echo Choose an Option: 45 | echo. 46 | echo 1 = Optimize for Gaming 47 | echo 2 = Exit 48 | echo. 49 | set /p c=Select your Option: 50 | if "%c%"=="test" goto test_menu 51 | if "%c%"=="1" goto optimize 52 | if "%c%"=="2" exit 53 | if "%c%" GTR "2" goto select_2 54 | if "%c%" LSS "1" goto select_2 55 | 56 | :select_3 57 | :: back menu which shows up after the optimizing process 58 | cls & echo. 59 | echo Choose an Option: 60 | echo. 61 | echo 1 = Revert to default 62 | echo 2 = Tool Menu 63 | echo 3 = Extras 64 | echo 4 = Exit 65 | echo. 66 | set /p c=Select your Option: 67 | if "%c%"=="test" goto test_menu 68 | if "%c%"=="1" goto reset 69 | if "%c%"=="2" goto tool_menu 70 | if "%c%"=="3" goto extra_menu 71 | if "%c%"=="4" goto exit_warning 72 | if "%c%" GTR "4" goto select_3 73 | if "%c%" LSS "1" goto select_3 74 | 75 | :tool_menu 76 | :: menu to quickly choose between various useful tools 77 | cls & echo. 78 | echo Select the Program you want to start: 79 | echo. 80 | echo 0 = Back 81 | echo 1 = Explorer 82 | echo 2 = Resource Monitor 83 | echo 3 = Soundmixer 84 | echo 4 = Task Manager 85 | echo 5 = Command Prompt 86 | echo. 87 | set /p c=Select your Option: 88 | if "%c%"=="test" goto test_menu 89 | if "%c%"=="0" cls & goto select_3 90 | if "%c%"=="1" start explorer /B 91 | if "%c%"=="2" start resmon 92 | if "%c%"=="3" start sndvol 93 | if "%c%"=="4" start taskmgr 94 | if "%c%"=="5" start cmd 95 | if "%c%" GTR "5" goto tool_menu 96 | 97 | :extra_menu 98 | :: menu with extra optimization options 99 | cls & echo. 100 | echo What do you want to do? 101 | echo. 102 | echo 0 = Back 103 | echo 1 = Enable/Disable DWM (Experimental) 104 | echo. 105 | set /p c=Select your Option: 106 | if "%c%"=="test" goto test_menu 107 | if "%c%"=="0" cls & goto select_3 108 | if "%c%"=="1" goto dwm_check 109 | if "%c%" GTR "1" goto extra_menu 110 | 111 | :test_menu 112 | :: menu to quickly jump to other parts of the script 113 | cls & echo. 114 | echo Menu for Testing 115 | echo. 116 | echo Please select an option: 117 | echo. 118 | echo 0 = Go Back to start 119 | echo 1 = select_2 120 | echo 2 = select_3 121 | echo 3 = tool_menu 122 | echo 4 = extra_menu 123 | echo 5 = exit_warning 124 | echo. 125 | set /p c=Select your Option: 126 | if "%c%"=="0" goto start 127 | if "%c%"=="1" cls & goto select_2 128 | if "%c%"=="2" cls & goto select_3 129 | if "%c%"=="3" goto tool_menu 130 | if "%c%"=="4" goto extra_menu 131 | if "%c%"=="5" goto exit_warning 132 | if "%c%" GTR "5" goto test_menu 133 | 134 | :optimize 135 | cls 136 | :: this part is still needs some restructuring 137 | :: list of services to be backed up, disabled and stopped 138 | setlocal EnableDelayedExpansion 139 | set "services=seclogon CDPSvc CscService PhoneSvc Fax InstallService icssvc SEMgrSvc SmsRouter Spooler SysMain WpnService WSearch stisvc TabletInputService DiagTrack MapsBroker CertPropSvc WbioSrvc wuauserv BDESVC DPS fhsvc SharedAccess Netlogon PcaSvc WpcMonSvc lmhosts WerSvc FrameServer wisvc VaultSvc BTAGService DusmSvc DoSvc dmwappushservice lfsvc NcdAutoSetup QWAVE RmSvc RasMan RasAuto ScDeviceEnum SCardSvr TapiSrv DispBrokerDesktopSvc LanmanServer LanmanWorkstation SENS fdPHost FDResPub" 140 | 141 | :: Backup current start types and running statuses to a file 142 | if not exist "%appdata%\Gaming Optimization" (md "%appdata%\Gaming Optimization") 143 | set backupFile="%appdata%\Gaming Optimization\service_backup.txt" 144 | echo. > %backupFile% 145 | for %%S in (%services%) do ( 146 | :: Fetch start type 147 | for /f "tokens=3" %%T in ('sc qc "%%S" ^| findstr "START_TYPE"') do ( 148 | set "startType=%%T" 149 | ) 150 | :: fetch running status 151 | for /f "tokens=4" %%R in ('sc query "%%S" ^| findstr "STATE"') do ( 152 | if "%%R"=="RUNNING" ( 153 | set "runningStatus=running" 154 | ) else ( 155 | set "runningStatus=stopped" 156 | ) 157 | ) 158 | echo %%S !startType! !runningStatus! >> %backupFile% 159 | ) 160 | 161 | :: disable and stop services 162 | for %%S in (%services%) do ( 163 | sc config "%%S" start= disabled 164 | sc stop "%%S" 165 | ) 166 | 167 | :: stopping listed tasks 168 | for %%S in (explorer.exe Microsoft.Photos.exe WinStore.App.exe TaskInputHost.exe ShellExperienceHost.exe GameBarPresenceWriter.exe atieclxx.exe RtkNGUI64.exe spoolv.exe) do ( 169 | taskkill /F /IM "%%S" 170 | ) 171 | 172 | :: lowering priorities from common processes 173 | for %%S in (steam.exe steamservice.exe steamwebhelper.exe GameOverlayUI.exe) do wmic process where name="%%S" CALL setpriority "64" 174 | for %%S in (chrome.exe firefox.exe) do wmic process where name="%%S" CALL setpriority "16384" 175 | 176 | :: deleting recycle bins and temp files 177 | for %%S in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do ( 178 | rd /s /q "%%S:\$Recycle.bin") 179 | rd /s /q "C:\Windows\Prefetch" "C:\Windows\Temp" "C:\Windows\SoftwareDistribution\Download" "%localappdata%\Temp" 180 | md "C:\Windows\Prefetch" "C:\Windows\Temp" "C:\Windows\SoftwareDistribution\Download" "%localappdata%\Temp" 181 | endlocal 182 | 183 | :: flusing dns 184 | ipconfig /flushDNS 185 | goto select_3 186 | 187 | :reset 188 | :: checking if dwm isn't running to resume winlogon and start dwm 189 | cls 190 | tasklist|find "dwm.exe" >nul 191 | if "%errorlevel%"== "1" "Tools\PSSuspend\pssuspend.exe" -accepteula -nobanner -r winlogon.exe 192 | 193 | :: starting previously closed tasks 194 | start explorer.exe 195 | 196 | :: read and restore start types and running statuses from backup file 197 | setlocal EnableDelayedExpansion 198 | set backupFile="%appdata%\Gaming Optimization\service_backup.txt" 199 | for /f "usebackq tokens=1,2,3" %%S in (%backupFile%) do ( 200 | rem Correctly format the start type for sc config 201 | set startType=%%T 202 | 203 | if "!startType!"=="2" set startType=auto 204 | if "!startType!"=="3" set startType=demand 205 | if "!startType!"=="4" set startType=disabled 206 | if "!startType!"=="0" set startType=boot 207 | if "!startType!"=="1" set startType=system 208 | if "!startType!"=="delayed-auto" set startType=delayed-auto rem Add this if delayed is used 209 | 210 | :: restore start type 211 | sc config "%%S" start= !startType! 212 | 213 | rem Restore running state if it was running 214 | if "%%U"=="running" ( 215 | sc start "%%S" 216 | ) 217 | ) 218 | 219 | :: revert priorities 220 | for %%S in (chrome.exe firefox.exe steam.exe steamservice.exe steamwebhelper.exe GameOverlayUI.exe) do ( 221 | wmic process where name="%%S" CALL setpriority "32" 222 | ) 223 | endlocal 224 | goto select_2 225 | 226 | :dwm_check 227 | :: check for pssuspend and download if not found 228 | tasklist | find "dwm.exe" 229 | if %version% GTR 10020348 cls & echo. & echo Windows 11 is not Supported! & goto select_3 230 | if not exist "Tools\PSSuspend\pssuspend.exe" goto download 231 | if "%errorlevel%"=="0" (goto dwm_disable) else (goto dwm_enable) 232 | :download 233 | cls & echo PSSuspend not found, downloading... 234 | if not exist Tools\PSSuspend md Tools\PSSuspend 235 | powershell -Command "Start-BitsTransfer "https://live.sysinternals.com/pssuspend.exe" "Tools\PSSuspend"" 236 | if "%errorlevel%"=="0" (goto dwm_disable) else (goto dwm_enable) 237 | 238 | :dwm_disable 239 | :: disable dwm by suspending winlogon 240 | cls & echo. 241 | echo Disable DWM... 242 | "Tools\PSSuspend\pssuspend.exe" -accepteula -nobanner winlogon.exe 243 | for %%S in (explorer.exe SearchApp.exe TextInputHost.exe StartMenuExperienceHost.exe ShellExperienceHost.exe dwm.exe) do taskkill /f /im "%%S" 244 | goto select_3 245 | 246 | :dwm_enable 247 | :: re-enable dwm by resuming winlogon 248 | cls & echo. 249 | echo Enable DWM... 250 | "Tools\PSSuspend\pssuspend.exe" -accepteula -nobanner -r winlogon.exe 251 | goto select_3 252 | 253 | 254 | :not_supported 255 | cls 256 | echo. 257 | echo Your current Windows Version isn't supported! 258 | echo Please press any Key to continue... 259 | pause >nul 260 | goto exit 261 | 262 | :exit_warning 263 | cls 264 | color 40 265 | echo. 266 | echo WARNING! When exiting now you can only start the script again by starting explorer.exe in Taskmanager! Are you sure? 267 | echo. 268 | echo 0 = No / 1 = Yes 269 | echo. 270 | set /p c=Proceed? = 271 | if "%c%"=="test" goto test_menu 272 | if "%c%"=="0" color 1f & cls & goto select_3 273 | if "%c%" GTR "1" goto exit_warning 274 | exit 275 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Windows Gaming Optimization Script 2 | ## **This script should be safe to run since it can revert everything it changed, however still _use it at your own risk_** 3 | 4 | Simple Batch that does optimizations like disabling Tasks, Services and much more while Gaming.
5 | All changes will only be temporary you also have the option to revert everything. 6 | 7 | ### Supported Windows Versions: 8 | - Windows 10 9 | - Windows 11*¹ 10 | - Windows Server*² 11 | 12 | *¹ While this should fully work on Windows 11 some features might be only available for Windows 10.
13 | *² All Windows Server Versions that are based on 10 (2016, 2019 & 2022) should work but aren't tested. 14 | 15 | ### Available Versions: 16 | - Gaming Optimization.bat (Recommended) - Main Project that doesn't need any changes from the User just download & run.
17 | - AutoOptimization.bat (NEW, WIP) - Basically like the main Script except that it automatically optimizes when a process listed in tasklist.txt runs and reverts everything when the task closes.
18 | - Gaming Optimization Extended.bat - Outdated and not Updated anymore only keeping it for archival reasons, was meant for advanced users since it needs lots of editing. 19 | 20 | Things that you in theory can expect from the Optimization:
21 | - Reduced Ram usage 22 | - Reduced Input Latency 23 | - Reduced CPU Usage in some cases 24 | - Free up Space 25 | 26 | ### Small list of the optimizing process: 27 | 28 | - Killing unessesary tasks 29 | - Disabling useless Services 30 | - Lower the Priority of some Processes 31 | - Clears the Recycle Bin, Temp, Prefetch and SoftwareDistribution Download Folders 32 | - Changes Powerplan 33 | - Flushes DNS (because it can) 34 | - Disable DWM (Reduces CPU Usage and Input Latency, Windows 10 only!) 35 | 36 | ## Credits / Other Sources 37 | [kurtis2222](https://github.com/kurtis2222/win10_dwm_tool) for the DWM Idea
38 | -------------------------------------------------------------------------------- /icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCraZyDuDee/Windows-Gaming-Optimization-Script/c41bdac5decd8d5f04e35fe57d469a5e611138e9/icon.ico --------------------------------------------------------------------------------