Advertisement
FreeBooter

SysPerf.bat

Sep 3rd, 2016
1,978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 26.47 KB | None | 0 0
  1. @Echo Off & Cls
  2. Call :IsAdmin
  3. :: Display the disclaimer screen.
  4. Mode CON  LINES=18 COLS=100 & Color 0E & Title Created By FREEBOOTER
  5. Set EULA_ACCEPTED=no
  6. SETLOCAL ENABLEDELAYEDEXPANSION              
  7. If /i not %EULA_ACCEPTED%==yes (
  8.         Echo.
  9.         Echo.
  10.         Echo.
  11.         Echo.
  12.     Echo  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ DISCLAIMER ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  13.     Echo  º                                                                          º
  14.     Echo  º   By running SysPerf you accept complete responsibility for anything     º  
  15.     Echo  º   that happens. Although the chance of something bad happening due to    º
  16.     Echo  º   SysPerf is pretty remote, it's always a possibility, and SysPerf has   º
  17.     Echo  º   no WARRANTY for any purpose.                                           º
  18.     Echo  º                                                                          º
  19.     Echo  º                             RUN IT AT YOUR OWN RISK                      º                      
  20.     Echo  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  21.     Echo.
  22.     Echo  If you accept this agreement please type ( YES ^)
  23.         Echo.
  24.     Echo  You can press CTRL^+C keys to cancel.
  25.     Echo.
  26.         Echo.
  27.     :Eula_Prompt
  28.         Echo.
  29.     Set /p CHOICE= RESPONSE:
  30.         Echo.
  31.     If /i not "!CHOICE!"=="YES" echo You must type 'YES' to continue && Goto Eula_Prompt
  32.     )
  33. ENDLOCAL DISABLEDELAYEDEXPANSION
  34.  
  35.  
  36.  
  37. Cls & Mode CON  LINES=11 COLS=60 & Color 0D &Title Created By FreeBooter
  38. Echo.
  39. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  40. Echo       º Apply Windows Performance Tweaks, Press (T) º  
  41. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  42. Echo.
  43. Echo.
  44. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»  
  45. Echo       º Restore Windows Default Setting, Press (R)  º  
  46. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ  
  47.  
  48. :: Thanks to 'annikk.exe' for above unicode characters.
  49.  
  50. Set /p input= RESPONSE:
  51. If /i  Not %input%==R (Goto :_Ex) Else (Goto :_RegRestore)
  52.  
  53. :_Ex
  54. If /i Not %input%==T  (Goto :EOF) Else (Goto :_Start)
  55.  
  56.  
  57.  
  58.  
  59. :_Start
  60. Cls & Mode CON  LINES=6 COLS=48 & Color 0B & Title Created By FreeBooter
  61. Echo.
  62. Echo.
  63. Echo.
  64. Echo.
  65. Echo.
  66. Echo.
  67. Echo.
  68. Echo.
  69. Echo.
  70. Echo.
  71. Echo.
  72. Echo.
  73. Echo.
  74. Echo.
  75. Echo.
  76. Echo        ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»  
  77. Echo        º CONFIGURING PERFORMANCE SETTINGS º
  78. Echo        ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  79. Echo.
  80. If Exist %SystemRoot%\ERDNT Goto :_Go
  81. for /f %%D in ('dir /s /b %tmp%\ERUNT.EXE') do Set A="%%D"
  82. %A%  %SystemRoot%\ERDNT sysreg curuser otherusers  /noconfirmdelete
  83. For /f %%A in ('dir /s /b %tmp%\nircmd.exe') do Copy "%%A" %SystemRoot%\ERDNT /y 2>&1 >Nul
  84. Ping -n 5 localhost >nul
  85.  
  86. :_Go
  87.  
  88. Reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects /v VisualFXSetting   /t REG_DWORD /d 3 /f 2>&1 >nul
  89.  
  90. Reg add "HKCU\Software\Microsoft\Windows\CurrentVersion"  /v ExtendedUIHoverTime /t REG_DWORD  /d 100 /f 2>&1 >nul
  91.  
  92. Reg add "HKCU\Control Panel\Mouse" /v MouseHoverTime /t REG_SZ /d 150 /f 2>&1 >nul
  93.  
  94. Reg add "HKCU\Control Panel\Desktop"  /v LowLevelHooksTimeout /t REG_SZ  /d 1000 /f 2>&1 >nul
  95.  
  96. Reg add "HKCU\Control Panel\Desktop"  /v ForegroundLockTimeout  /t REG_DWORD /d 0 /f 2>&1 >nul
  97.  
  98. Reg add "HKCU\Control Panel\Desktop"  /v DragFullWindows    /t REG_SZ  /d 0 /f 2>&1 >nul
  99.  
  100. Reg add  HKLM\SOFTWARE\Microsoft\DWM  /v Animations /t REG_DWORD /d 0 /f 2>&1 >nul
  101.  
  102. Reg add "HKCU\Control Panel\Desktop"  /v MenuShowDelay /t REG_SZ  /d 0 /f 2>&1 >nul
  103.  
  104. Reg add "HKCU\Control Panel\Desktop\WindowMetrics" /v MinAnimate /t REG_SZ /d 0 /f 2>&1 >nul
  105.  
  106. Reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies /v NoLowDiskSpaceChecks /t REG_DWORD /d 1 /f 2>&1 >nul
  107.  
  108. Reg add "HKU\S-1-5-19\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d 1 /f 2>&1 >nul
  109.  
  110. Reg add "HKU\S-1-5-19\Control Panel\Desktop" /v "HungAppTimeout" /t REG_SZ /d 1000 /f 2>&1 >nul
  111.  
  112. Reg add "HKU\S-1-5-19\Control Panel\Desktop" /v "MenuShowDelay" /t REG_SZ /d 0 /f 2>&1 >nul
  113.  
  114. Reg add "HKU\S-1-5-19\Control Panel\Desktop" /v "WaitToKillAppTimeout" /t REG_SZ /d "2000" /f 2>&1 >nul
  115.  
  116. Reg add "HKU\S-1-5-20\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d 1 /f 2>&1 >nul
  117.  
  118. Reg add "HKU\S-1-5-20\Control Panel\Desktop" /v "HungAppTimeout" /t REG_SZ /d 1000 /f 2>&1 >nul
  119.  
  120. Reg add "HKU\S-1-5-20\Control Panel\Desktop" /v "MenuShowDelay" /t REG_SZ /d "0" /f 2>&1 >nul
  121.  
  122. Reg add "HKU\S-1-5-20\Control Panel\Desktop" /v "WaitToKillAppTimeout" /t REG_SZ /d 2000 /f 2>&1 >nul
  123.  
  124. Reg add "HKCU\Control Panel\Desktop"  /v HungAppTimeout   /t REG_SZ  /d 1000  /f 2>&1 >nul
  125.  
  126. Reg add "HKCU\Control Panel\Desktop"  /v WaitToKillAppTimeout  /t REG_SZ  /d 2000  /f 2>&1 >nul
  127.  
  128. Reg add "HKLM\SYSTEM\ControlSet002\Control" /v WaitToKillServiceTimeout /t REG_SZ /d 1000 /f 2>&1 >nul
  129.  
  130. Reg add "HKLM\SYSTEM\ControlSet001\Control" /v WaitToKillServiceTimeout /t REG_SZ /d 1000 /f 2>&1 >nul
  131.  
  132. Reg add "HKLM\SYSTEM\CurrentControlSet\Control" /v WaitToKillServiceTimeout /t REG_SZ /d 1000 /f 2>&1 >nul
  133.  
  134. Reg add "HKCU\Control Panel\Desktop"  /v AutoEndTasks  /t REG_SZ /d 1  /f 2>&1 >nul
  135.  
  136. Reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoRestartShell  /t REG_DWORD /d 1 /f 2>&1 >nul
  137.  
  138. Reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer /v "Max Cached Icons"  /t REG_SZ /d 4096 /f 2>&1 >nul
  139.  
  140. Reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v DesktopLivePreviewHoverTime /t REG_DWORD /d 0 /f 2>&1 >nul
  141.  
  142. Reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarAnimations  /t REG_DWORD /d 0 /f 2>&1 >nul
  143.  
  144. Reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"  /v ListviewAlphaSelect  /t REG_SZ /d 0 /f 2>&1 >nul
  145.  
  146. Reg add HKCU\SOFTWARE\Microsoft\Windows\DWM   /v EnableAeroPeek  /t  REG_DWORD  /d 0 /f 2>&1 >nul
  147.  
  148. Reg add HKCU\SOFTWARE\Microsoft\Windows\DWM   /v AlwaysHibernateThumbnails /t  REG_DWORD  /d 0 /f 2>&1 >nul
  149.  
  150. Reg add "HKLM\System\CurrentControlSet\Control\SESSION MANAGER\MEMORY MANAGEMENT" /v Disablepagingexecutive  /t REG_DWORD /d 1 /f 2>&1 >nul
  151.  
  152. Reg add "HKLM\System\CurrentControlSet\Control\PriorityControl" /v Win32PrioritySeparation /t REG_DWORD /d 38 /f 2>&1 >nul
  153.  
  154. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout"  /v EnableAutoLayout /t REG_DWORD  /d 1 /f 2>&1 >nul
  155.  
  156. Reg add "HKLM\System\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD  /d 1  /f 2>&1 >nul
  157.  
  158. Reg add "HKLM\SOFTWARE\Microsoft\PCHealth\ErrorReporting" /v ShowUI /t REG_DWORD /d 0 /f 2>&1 >nul
  159.  
  160. Reg add "HKLM\System\CurrentControlSet\Control\SESSION MANAGER\MEMORY MANAGEMENT" /v IoPageLockLimit /t REG_DWORD /d 134217728 /f 2>&1 >nul
  161.  
  162. Reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Auto /t REG_DWORD  /d 0 /f 2>&1 >nul
  163.  
  164. Reg add "HKLM\SOFTWARE\Microsoft\PCHealth\ErrorReporting" /v DoReport /t REG_DWORD /d 0 /f 2>&1 >nul
  165.  
  166. Reg  add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters" /v MaxConnectionsPerServer /t REG_DWORD  /d 0  /f 2>&1 >nul
  167.  
  168. Reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters"  /v Tcp1323Opts   /t REG_DWORD  /d 1  /f 2>&1 >nul
  169.  
  170. Reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters"  /v SackOpts    /t REG_DWORD  /d 1  /f 2>&1 >nul
  171.  
  172. Reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters"  /v TcpMaxDupAcks /t REG_DWORD  /d 2  /f 2>&1 >nul
  173.  
  174. Reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters"  /v  NameSrvQueryTimeout  /t REG_DWORD  /d 3000 /f 2>&1 >nul
  175.  
  176. Reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters"  /v TcpMaxDupAcks  /t REG_DWORD /d 2 /f 2>&1 >nul
  177.  
  178. Reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters"  /v EnablePMTUDiscovery /t REG_DWORD /d 1 /f 2>&1 >nul
  179.  
  180. Reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters"  /v EnablePMTUBHDetect /t REG_DWORD /d 1 /f 2>&1 >nul
  181.  
  182. Reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters" /v DefaultTTL /t REG_DWORD /d 64 /f 2>&1 >nul
  183.  
  184. Reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v MaxFreeTcbs  /t REG_DWORD  /d 65536 /f 2>&1 >nul
  185.  
  186. Reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v MaxUserPort  /t REG_DWORD /d 65534 /f 2>&1 >nul
  187.  
  188. Reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v GlobalMaxTcpWindowSize /t REG_DWORD /d  65535 /f 2>&1 >nul
  189.  
  190. Reg add "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v TcpTimedWaitDelay  /t REG_DWORD /d 30 /f 2>&1 >Nul
  191.  
  192. Reg add "HKLM\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_MAXCONNECTIONSPER1_0SERVER" /v iexplore.exe /t REG_DWORD /d 10 /f 2>&1 >nul
  193.  
  194. Reg add "HKLM\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_MAXCONNECTIONSPERSERVER" /v iexplore.exe /t REG_DWORD /d 10 /f 2>&1 >nul
  195.  
  196. Reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v MaxConnectionsPer1_0Server /t REG_DWORD /d 10 /f 2>&1 >nul
  197.  
  198. Reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v MaxConnectionsPerServer /t REG_DWORD /d 10 /f 2>&1 >nul
  199.  
  200. Reg add "HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v MaxCollectionCount /t REG_DWORD /d 32 /f 2>&1 >nul
  201.  
  202. Reg add "HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v MaxThreads  /t REG_DWORD /d 30 /f 2>&1 >nul
  203.  
  204. Reg add "HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v MaxCmds /t REG_DWORD  /d 30 /f 2>&1 >nul
  205.  
  206. Reg add "HKLM\System\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9" /v Serial_Access_Num /t REG_DWORD /d 9 /f 2>&1 >nul
  207.  
  208. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Active Setup Temp Folders" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  209.  
  210. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\BranchCache" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  211.  
  212. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Downloaded Program Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  213.  
  214. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Internet Cache Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  215.  
  216. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Memory Dump Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  217.  
  218. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Old ChkDsk Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  219.  
  220. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Previous Installations" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  221.  
  222. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Recycle Bin" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  223.  
  224. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Service Pack Cleanup" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  225.  
  226. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Setup Log Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  227.  
  228. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\System error memory dump files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  229.  
  230. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\System error minidump files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  231.  
  232. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  233.  
  234. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Setup Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  235.  
  236. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Thumbnail Cache" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  237.  
  238. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Update Cleanup" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  239.  
  240. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Upgrade Discarded Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  241.  
  242. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\User file versions" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  243.  
  244. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Defender" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  245.  
  246. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting Archive Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  247.  
  248. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting Queue Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  249.  
  250. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting System Archive Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  251.  
  252. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting System Queue Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  253.  
  254. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows ESD installation files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  255.  
  256. Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Upgrade Log Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
  257.  
  258. For /f "skip=2 tokens=3" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /v EnablePrefetcher') do set P=%%a
  259.  
  260. If %P% NEQ 0x0 (
  261. Reg add "HKLM\System\CurrentControlSet\Control\SESSION MANAGER\MEMORY MANAGEMENT\PrefetchParameters"   /v EnablePrefetcher /t REG_DWORD  /d 3  /f 2>&1 >nul
  262.  
  263. Reg add "HKLM\System\CurrentControlSet\Control\SESSION MANAGER\MEMORY MANAGEMENT\PrefetchParameters"   /v EnableSuperfetch /t REG_DWORD  /d 3  /f 2>&1 >nul
  264. )
  265.  
  266.  
  267. :: Disable and stop Adaptive Brightness service
  268. Sc config SensrSvc start= disabled  2>&1 >nul
  269. Sc stop SensrSvc 2>&1 >nul
  270.  
  271. :: Disable and stop Computer browser service
  272. Sc config Browser start= disabled  2>&1 >nul
  273. Sc stop Browser 2>&1 >nul
  274.  
  275. :: Disable and stop Certificate Propagation service
  276. Sc config CertPropSvc start= disabled  2>&1 >nul
  277. Sc stop CertPropSvc 2>&1 >nul
  278.  
  279. :: Disable and stop  Distributed Link Tracking Client service
  280. Sc config TrkWks start= disabled  2>&1 >nul
  281. Sc stop TrkWks 2>&1 >nul
  282.  
  283. :: Manual and stop Encrypting File System service
  284. Sc config EFS start= demand  2>&1 >nul
  285. Sc stop EFS 2>&1 >nul
  286.  
  287. :: Manual and stop Function Discovery Provider Host service
  288. Sc config fdPHost start= demand  2>&1 >nul
  289. Sc stop fdPHost 2>&1 >nul
  290.  
  291. :: Disable and stop Function Discovery Resource Publication service
  292. Sc config FDResPub start= disabled  2>&1 >nul
  293. Sc stop FDResPub 2>&1 >nul
  294.  
  295. :: Disable and stop HomeGroup Listener service
  296. Sc config HomeGroupListener start= disabled  2>&1 >nul
  297. Sc stop HomeGroupListener 2>&1 >nul
  298.  
  299. :: Disable and stop HomeGroup Provider service
  300. Sc config HomeGroupProvider start= disabled 2>&1 >nul  
  301. Sc stop HomeGroupProvider 2>&1 >nul
  302.  
  303. :: Disable and stop Offline Files service
  304. Sc config CscService start= disabled  2>&1 >nul
  305. Sc stop CscService 2>&1 >nul
  306.  
  307. :: Manual and stop Parental Controls/Family Safety service
  308. Sc config WPCSvc start= demand  2>&1 >nul
  309. Sc stop WPCSvc 2>&1 >nul
  310.  
  311. :: Manual and stop Print Spooler service
  312. Sc config Spooler start= demand  2>&1 >nul
  313. Sc stop Spooler 2>&1 >nul
  314.  
  315. :: Disable and stop Internet Connection Sharing (ICS) service
  316. Sc config SharedAccess start= disabled 2>&1 >nul
  317. Sc stop SharedAccess 2>&1 >nul
  318.  
  319. :: Disable and stop IP Helper service
  320. Sc config iphlpsvc start= disabled 2>&1 >nul
  321. Sc stop iphlpsvc 2>&1 >nul
  322.  
  323. :: Disable and stop Microsoft iSCSI Initiator Service
  324. Sc config MSiSCSI start= disabled  2>&1 >nul
  325. Sc stop MSiSCSI 2>&1 >nul
  326.  
  327. :: Disable and stop Netlogon service
  328. Sc config Netlogon start= disabled   2>&1 >nul
  329. Sc stop Netlogon 2>&1 >nul
  330.  
  331. :: Manual and stop Remote Desktop Configuration service
  332. Sc config SessionEnv start= demand 2>&1 >nul
  333. Sc stop SessionEnv 2>&1 >nul
  334.  
  335.  
  336. :: Manual and stop Remote Desktop Services
  337. Sc config TermService start= demand  2>&1 >nul
  338. Sc stop TermService 2>&1 >nul
  339.  
  340.  
  341. :: Disable and stop Remote Registry service
  342. Sc config RemoteRegistry start= disabled  2>&1 >nul
  343. Sc stop RemoteRegistry 2>&1 >nul
  344.  
  345. :: Manual and stop Routing and Remote Access Service
  346. Sc config RemoteAccess start= demand  2>&1 >nul
  347. Sc stop RemoteAccess 2>&1 >nul
  348.  
  349. :: Disable and stop Smart Card service
  350. Sc config SCardSvr start= disabled  2>&1 >nul
  351. Sc stop SCardSvr 2>&1 >nul
  352.  
  353. :: Disable and stop Server service
  354. Sc config LanmanServer start= disabled 2>&1 >nul
  355. Sc stop LanmanServer  2>&1 >nul
  356.  
  357. :: Disable and stop Workstation service
  358. Sc config LanmanWorkstation start= disabled 2>&1 >nul
  359. Sc stop LanmanWorkstation 2>&1 >nul
  360.  
  361. :: Disable and stop Tablet PC Input Service/Touch Keyboard and Handwriting Panel Service
  362. Sc config TabletInputService start= demand 2>&1 >nul
  363. Sc stop TabletInputService 2>&1 >nul
  364.  
  365. :: Manual and stop Windows Biometric Service
  366. Sc config WbioSrvc start= demand 2>&1 >nul
  367. Sc stop WbioSrvc 2>&1 >nul
  368.  
  369. :: Disable and stop Windows Error Reporting Service
  370. Sc config WerSvc start= disabled  2>&1 >nul
  371. Sc stop WerSvc 2>&1 >nul
  372.  
  373. :: Disable and stop Windows Media Player Network Sharing-service
  374. Sc config WMPNetworkSvc start= disabled  2>&1 >nul
  375. Sc stop WMPNetworkSvc 2>&1 >nul
  376.  
  377. :: Manual and stop Windows Help service
  378. Sc config helpsvc start= demand  2>&1 >nul
  379. Sc stop helppsvc 2>&1 >nul
  380.  
  381.  
  382. :: Disable and stop SSDP Discovery service
  383. sc config SSDPSRV start= disabled 2>&1 >nul
  384. Sc stop SSDPSRV 2>&1 >nul
  385.  
  386. Rem Skip disabling Windows Search service if O/S is Windows 10
  387. For /f "tokens=2 delims=[]" %%a in ('ver') do (set Version=%%a)
  388. Set Version=%Version:~8,2%
  389. If %Version% EQU 10 (Goto :Skip)
  390.  
  391. :: Disable and stop Windows Search service
  392. Sc config WSearch start= disabled  2>&1 >nul
  393. Sc stop WSearch 2>&1 >nul
  394.  
  395. :Skip
  396. Rem Enable Compound TCP (CTCP) to CTCP increases the TCP send window more aggressively for broadband connections.
  397. Reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName | find /i "Windows Vista" >Nul
  398. If Not Errorlevel 1 (
  399. Netsh int tcp set global congestionprovider=ctcp 2>&1 >Nul
  400. ) Else (
  401. Reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName | find /i "Windows 7" >Nul
  402. If Not Errorlevel 1 (
  403. Netsh int tcp set global congestionprovider=ctcp 2>&1 >Nul
  404. ) Else (
  405. Goto :_Cleanup
  406. )
  407.  )
  408. ::    CLEANUP STAGE
  409. :_Cleanup
  410. Cls & Mode CON  LINES=6 COLS=50 & Color 1E & Title Created by FREEBOOTER
  411. Echo.
  412. Echo.
  413. Echo.
  414. Echo.
  415. Echo.
  416. Echo.
  417. Echo.
  418. Echo.
  419. Echo.
  420. Echo.
  421. Echo.
  422. Echo.
  423. Echo.
  424. Echo.
  425. Echo.
  426. Echo           ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  427. Echo           º DELETING TEMPORARY FILES º  
  428. Echo           ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  429. Echo.
  430.  
  431. CLEANMGR /sagerun:64
  432.  
  433.  
  434. For /f "tokens=2 delims=[]" %%a in ('ver') do (set Version=%%a)
  435. Set Version=%Version:~8,2%
  436. If %Version% GEQ 6 (Goto :New_Win) Else (Goto :Old_Win)
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443. :Old_Win
  444. For /D %%a in ("%SystemDrive%\Documents and Settings\*") do (
  445. Del /F /S /Q "%WINDIR%\TEMP\*" 2> Nul 1 >Nul & Cls
  446. Echo            DELETING TEMPORARY FILES
  447. If exist %SystemDrive%\MSOCache RD/S /Q %SystemDrive%\MSOCache 2> Nul 1 >Nul
  448. For %%i in (NVIDIA,ATI,AMD,Dell,Intel) do (
  449. Rd /S /Q "%SystemDrive%\%%i" 2> Nul 1 >Nul & Cls
  450. Echo            DELETING TEMPORARY FILES
  451. ) )
  452. Cls
  453.    
  454.  
  455.  
  456.  
  457.  
  458. :: Check which storage device been used and if its SSD will skip defragmentation for the SSD storage device.
  459. SETLOCAL ENABLEDELAYEDEXPANSION
  460. For /f %%f in ('Dir /s /b %tmp%\smartctl.exe') do (
  461.         Set k=%%f
  462.  
  463.  
  464. For /f "tokens=1,2,3*" %%i in ('!k! --scan') do (
  465.         @Echo   %%i  %%j %%l | Find /i "SSD" >Nul
  466.          If ERRORLEVEL==1 (Goto HDD) Else (Goto TheEnd)
  467.  
  468.  
  469. For /f "tokens=1,2,3*" %%g in ('!k! --scan') do (
  470.         @Echo   %%g  %%s %%m | Find /i "Solid State" >NUL
  471.      If ERRORLEVEL==1 (Goto HDD) Else (Goto TheEnd)
  472.  
  473.    
  474. For /f "tokens=1,2,3*" %%h in ('!k! --scan') do (
  475.     @Echo   %%h  %%p %%c | Find /i "SandForce" >NUL
  476.         If ERRORLEVEL==1 (Goto HDD) Else (Goto TheEnd)
  477.  
  478.  
  479.  
  480.  
  481.  )
  482.    )
  483.      )
  484.        )
  485. ENDLOCAL DISABLEDELAYEDEXPANSION 2>&1 >Nul
  486. Cls
  487.  
  488. :HDD
  489.  
  490. Mode CON  LINES=39 COLS=85 & Color 0E & Title    PLEASE WAIT..
  491. Echo.
  492. Echo INVOKING BOOT OPTIMIZATION ON C: PARTITION...
  493. Echo.
  494. Echo                PLEASE WAIT..
  495. Defrag C: -B -F -V
  496. Ping -n 5 localhost >Nul
  497. Cls
  498. Echo.
  499. Echo.
  500. Echo.
  501. Echo.
  502. Cls
  503. Mode CON  LINES=39 COLS=85 & Color 0D & Title    PLEASE WAIT..
  504. Defrag C: -V -F
  505. Ping -n 5 localhost >Nul
  506. Cls
  507. :: Set virtual memory size to static amount.
  508. SETLOCAL ENABLEDELAYEDEXPANSION
  509. For /f "tokens=4,5* delims=,. " %%G in ('Systeminfo  ^| Find "Total Physical Memory:"') DO Set RAM=%%G%%H
  510. If "!RAM!"=="" Goto TheEnd
  511. Set /A PageSize=!RAM!*2
  512. Reg add "HKLM\SYSTEM\CurrentControlSet\Control\SESSION MANAGER\MEMORY MANAGEMENT" /v "PagingFiles" /t REG_MULTI_SZ /d "c:\pagefile.sys !PageSize! !PageSize!"  /f
  513. ENDLOCAL DISABLEDELAYEDEXPANSION 2>&1 >Nul
  514. Cls
  515. Goto :TheEnd
  516.  
  517.  
  518.  
  519.  
  520. :New_Win
  521.  
  522. Rundll32.exe inetcpl.cpl,ClearMyTracksByProcess 4351
  523.  
  524. For /D %%b in ("%SystemDrive%\Users\*") do (
  525. Del /F /Q /A "%%b\AppData\Roaming\Microsoft\Windows\Recent\*" 2> Nul 1 >Nul
  526. Del /F /S /Q "%WINDIR%\TEMP\*" 2> Nul 1 >Nul
  527. If exist %SystemDrive%\MSOCache RD /S /Q %SystemDrive%\MSOCache 2> Nul 1 >Nul
  528. Del /F /Q /A /S "%LocalAppdata%\Microsoft\Windows\INetCookies\*.*" 2> Nul 1 >Nul
  529. For %%i in (NVIDIA,ATI,AMD,Dell,Intel) do (
  530. Rd /S /Q "%SystemDrive%\%%i" 2> Nul 1 >Nul )
  531.        
  532. )
  533. Cls
  534.  
  535. Mode CON  LINES=12 COLS=80 & Color 1E & Title Created by FREEBOOTER
  536. Reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName | find /i "Windows 8" >Nul
  537. If Not Errorlevel 1 (
  538. Dism /Online /Cleanup-Image /StartComponentCleanup
  539. Ping -n 5 localhost >Nul
  540. ) Else (
  541. Reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName | find /i "Windows 8.1" >Nul
  542. If Not Errorlevel 1 (
  543. Dism /Online /Cleanup-Image /StartComponentCleanup
  544. Ping -n 5 localhost >Nul
  545. ) Else (
  546. Reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName | find /i "Windows 10" >Nul
  547. If Not Errorlevel 1 (
  548. Dism /Online /Cleanup-Image /StartComponentCleanup
  549. Ping -n 5 localhost >Nul
  550. ) ) )  
  551.  
  552. Cls
  553. Mode CON  LINES=38 COLS=85 & Color 0E & Title    PLEASE WAIT....
  554. For /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
  555. Echo.
  556. Echo                    EVENT LOGS HAVE BEEN CLEARED!
  557. Ping -n 5 localhost >Nul
  558. Goto NextStage
  559. :do_clear
  560. Echo clearing %1
  561. wevtutil.exe cl %1
  562. Goto :EOF
  563. Cls
  564.  
  565. :NextStage
  566. :: Check which storage device been used and if its SSD will skip defragmentation for the SSD storage device.
  567. SETLOCAL ENABLEDELAYEDEXPANSION
  568. For /f %%f in ('Dir /s /b %tmp%\smartctl.exe') do (
  569. Set k=%%f
  570.  
  571.  
  572. For /f "tokens=1,2,3*" %%i in ('!k! --scan') do (
  573.         @Echo   %%i  %%j %%l | Find /i "SSD" >Nul
  574.         If ERRORLEVEL==1 (Goto _HDD) Else (Goto TheEnd)
  575.  
  576.  
  577. For /f "tokens=1,2,3*" %%g in ('!k! --scan') do (
  578.         @Echo   %%g  %%s %%m | Find /i "Solid State" >NUL
  579.           If ERRORLEVEL==1 (Goto _HDD) Else (Goto TheEnd)
  580.  
  581.    
  582. For /f "tokens=1,2,3*" %%h in ('!k! --scan') do (
  583.         @Echo   %%h  %%p %%c | Find /i "SandForce" >NUL
  584.       If ERRORLEVEL==1 (Goto _HDD) Else (Goto TheEnd)
  585.  
  586.  
  587.  
  588.  )
  589.    )
  590.      )
  591.        )
  592.  
  593.  
  594. ENDLOCAL DISABLEDELAYEDEXPANSION 2>&1 >Nul
  595. Cls
  596.  
  597. :_HDD
  598.  
  599. Mode CON  LINES=39 COLS=95 & Color 0E & Title    PLEASE WAIT....
  600. Echo.
  601. Defrag C: /X /W /F /H /V
  602. Ping -n 5 localhost >Nul
  603. Cls
  604. Mode CON  LINES=39 COLS=95 & Color 0D & Title    PLEASE WAIT....
  605. Echo.
  606. Defrag   /W /C /H /V /F
  607. Ping -n 5 localhost >Nul
  608. Cls
  609. Mode CON  LINES=39 COLS=95 & Color 0B & Title    PLEASE WAIT....
  610. Echo.
  611. Defrag C: /B /H /V /W /F
  612. Ping -n 5 localhost >Nul
  613.  
  614. Cls
  615. :: Set virtual memory size to static amount.
  616. SETLOCAL ENABLEDELAYEDEXPANSION
  617. For /f "tokens=4,5* delims=,. " %%G in ('Systeminfo  ^| Find "Total Physical Memory:"') DO Set RAM=%%G%%H
  618. If "!RAM!"=="" Goto TheEnd
  619. Set /A PageSize=!RAM!*2
  620. Reg add "HKLM\SYSTEM\CurrentControlSet\Control\SESSION MANAGER\MEMORY MANAGEMENT" /v "PagingFiles" /t REG_MULTI_SZ /d "c:\pagefile.sys !PageSize! !PageSize!"  /f
  621. ENDLOCAL DISABLEDELAYEDEXPANSION 2>&1 >Nul
  622. Cls
  623.  
  624. :TheEnd
  625. If Not Exist "%ProgramFiles(x86)%" (
  626. Cls & Mode CON  LINES=11 COLS=51 & Color 0E & Title FreeBooter
  627. Echo.
  628. Echo.
  629. Echo THIS COMPUTER WILL REBOOT
  630. Echo.
  631. Echo.
  632. Echo PLEASE SAVE ALL WORK IN PROGRESS
  633. Echo.
  634. Echo.
  635. Echo PRESS 'ENTER' KEY TO REBOOT ^&^ DEFRAGMENT PAGEFILE
  636. Pause >Nul
  637. SETLOCAL ENABLEDELAYEDEXPANSION
  638. Reg add HKCU\SOFTWARE\Sysinternals\PageDefrag  /v eulaaccepted /t REG_DWORD /d 1 /f 2>&1 >Nul
  639. For /f %%G in ('dir /s /b %tmp%\Pagedfrg.exe') do (
  640. Set B="%%G"
  641. !B! -o  -t 1 2>&1 > Nul
  642. ENDLOCAL DISABLEDELAYEDEXPANSION 2>&1 >Nul
  643. )
  644. Shutdown  -r  -t 0  -c "REBOOTING SYSTEM" 2>&1 > Nul
  645. Cls
  646. ) Else (
  647. Cls & Mode CON  LINES=11 COLS=42 & Color 0E & Title FreeBooter
  648. Echo.
  649. Echo.
  650. Echo    THIS COMPUTER WILL REBOOT
  651. Echo.
  652. Echo.
  653. Echo    PLEASE SAVE ALL WORK IN PROGRESS
  654. Echo.
  655. Echo.
  656. Echo    PRESS 'ENTER' KEY TO RESTART COMPUTER
  657. Pause >Nul
  658.  
  659. Shutdown  -r  -t 0  -c "REBOOTING SYSTEM" 2>&1 > Nul
  660. Cls
  661. Exit
  662. )
  663.  
  664. :_RegRestore
  665. If Not Exist %SystemRoot%\ERDNT (
  666. Cls & Mode CON  LINES=5 COLS=48 & Color 0C & Title - WARNING -
  667.  Echo.
  668.  Echo.
  669.  Echo             - NO RESTORE POINT EXIST -
  670.  Pause >Nul & Exit
  671. )
  672.  
  673. Cls & Mode CON  LINES=11 COLS=62 & Color 0E & Title Restoring Settings
  674. Echo.
  675. Echo.
  676. Echo       THIS SYSTEM WILL REBOOT
  677. Echo.
  678. Echo.
  679. Echo       PLEASE SAVE ALL WORK IN PROGRESS
  680. Echo.
  681. Echo.
  682. Echo       PRESS 'ENTER' KEY TO RESTORE WINDOWS DEFAULT SETTINGS
  683. Pause >Nul
  684. Netsh int tcp set global congestionprovider=none 2>&1 >Nul
  685. CD %SystemRoot%\ERDNT
  686. For /f %%F in ('dir /s /b %tmp%\nircmd.exe') do Set C="%%F"
  687. %C% dlg "" "" click yes  | ERDNT.EXE silent sysreg curuser otherusers /reboot 2>&1 >Nul
  688. Goto :EOF
  689.  
  690. :IsAdmin
  691. Reg query "HKU\S-1-5-19\Environment"
  692. If Not %ERRORLEVEL% EQU 0 (
  693.  Cls & Mode CON  LINES=5 COLS=48 & Color 0C & Title - WARNING -
  694.  Echo.
  695.  Echo.
  696.  Echo  YOU MUST HAVE ADMINISTRATOR RIGHTS TO CONTINUE
  697.  Pause >Nul & Exit
  698. )
  699. Cls
  700. Goto :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement