Guest User

Untitled

a guest
Mar 23rd, 2025
28
0
8 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.08 KB | Source Code | 0 0
  1. @echo off
  2. :: Start maximized
  3. if not "%1" == "max" start /MAX /wait cmd /c %0 max & exit/b
  4. @REM mode 800
  5. setlocal enabledelayedexpansion
  6. title FoxOS W11 Post-Install Tweaks
  7.  
  8. set "CMDLINE=RED=,S_GRAY=,S_RED=,S_GREEN=,S_YELLOW=,S_MAGENTA=,S_WHITE=,B_BLACK=,B_YELLOW=,UNDERLINE=,_UNDERLINE="
  9. set ""
  10. :: Credits to Artanis for colors
  11.  
  12. color C
  13. echo.
  14. echo.
  15. echo.
  16. echo. :~:
  17. echo. .*?7??.
  18. echo. .*7??7?J?
  19. echo. *????* *?J~
  20. echo. .~7J7*. :?J~
  21. echo. .~?J??. .???.
  22. echo. .~?J??????777??7???
  23. echo. *?J????????????J????~
  24. echo. .7J???????????????????J?.
  25. echo. :?J???????????????????????~.
  26. echo. *?????????????????????????JJ??: .:*~??777??~:.
  27. echo. *???????????????????JJ???777?7JJ7~:. .:~7???7??~~??7???7?:
  28. echo. :????????????????J?7?~*:.. :~7?J?7?*:. :???J?~: .*??J7*
  29. echo. 7????????????J???*. .:~?7????7?. .??J??????7~: .~?J7:
  30. echo. *J??????????J??:. :??J?~. *?J?????????J?7~. .???*
  31. echo. 7?????????J?~. .:*??J??*. *???????????????J?*.:*??77777?JJ*
  32. echo. .??????????~. ...:*~?7?J?7?*. :??????????????????J???7?~~~~~~???
  33. echo. :???????J7: :7??????7?~*. 7????????????????J??*.
  34. echo. :??????J7. .?????:... .?????????????????~.
  35. echo. .?????J7 :?J????~ .????????????????.
  36. echo. 7????7. *???????J7* 7??????????????
  37. echo. ~J???* :???????????7: *?????????????.
  38. echo. .???7 .??????????????7* ?J?????????J?
  39. echo. *JJ* ~J???????????????7~: .7???????????
  40. echo. ?J: .??????????????????J?7~:. :???????????.
  41. echo. ?. :?????????????????????J???*. :?????????J~
  42. echo. *J???????????????????????JJ?~. :??????????*
  43. echo. :???????????????????????????J?* *??????????.
  44. echo. .??????????????????????????????~ ~J???????J7
  45. echo. 7?????????????????????????????J* .??????????:
  46. echo. *???????????????????????????????. ?????????J*
  47. echo. ~J?????????????????????????????. ?J??????J?.
  48. echo. ~???????????????????????????J? .7?????J?7.
  49. echo. *7J???????????????????????J7. ?J?JJ???:
  50. echo. *7?J?????????????????J?7* :7??7?~:.
  51. echo. :~7???JJJJ???JJJ??7?: :*:..
  52. echo. .:**~??????~~*. ..
  53. echo.
  54. echo.
  55. echo.
  56. echo.
  57. echo.
  58.  
  59.  
  60. echo.
  61. echo.
  62. echo !S_WHITE!The ISO was made by CatGamerOP on Discord.
  63. echo The ISO is free and is NOT for sale.
  64. echo You can download it from the official FoxOS Discord Server: !S_MAGENTA!https://discord.gg/4Gg8n6WhPN
  65. timeout 4 >NUL 2>&1
  66. echo.
  67. echo.
  68. echo !S_GRAY!Applying Windows Tweaks...
  69.  
  70. echo Installing Required Dependencies
  71. reg add "HKLM\SYSTEM\CurrentControlSet\services\Dhcp" /v "Start" /t REG_DWORD /d "2" /f >NUL 2>&1
  72. @REM reg add "HKLM\SYSTEM\CurrentControlSet\services\TrustedInstaller" /v "Start" /t REG_DWORD /d "3" /f >NUL 2>&1
  73. @REM reg add "HKLM\SYSTEM\CurrentControlSet\services\msiserver" /v "Start" /t REG_DWORD /d "3" /f >NUL 2>&1
  74. cd /d "C:\Windows\APIs" >NUL 2>&1
  75. echo !S_GREEN!Installing Visual C++
  76. start /wait VisualC\install_all.bat >NUL 2>&1
  77. echo Installing DirectX
  78. start /wait DirectX\#install.bat >NUL 2>&1
  79. echo Installing 7-Zip
  80. start /wait 7z.exe /S >NUL 2>&1
  81. regedit /s "7ZIP.reg" >NUL 2>&1
  82.  
  83. echo !S_GRAY!Importing Power Plan
  84. powercfg -import "\APIs\Cat10IdleOn.pow" 69420228-6969-6969-6969-694202281337 >NUL 2>&1
  85. powercfg -import "\APIs\Cat10IdleOff.pow" 70420228-6969-6969-6969-694202281337 >NUL 2>&1
  86. powercfg -setactive 69420228-6969-6969-6969-694202281337 >NUL 2>&1
  87. :: powercfg -delete 381b4222-f694-41f0-9685-ff5bb260df2e >NUL 2>&1
  88. :: powercfg -delete 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c >NUL 2>&1
  89. :: powercfg -delete a1841308-3541-4fab-bc81-f71556f20b4a >NUL 2>&1
  90.  
  91. echo Setting Colors
  92. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" /v "StartColorMenu" /t REG_DWORD /d "4284394495" /f >NUL 2>&1
  93. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" /v "AccentColorMenu" /t REG_DWORD /d "4286102015" /f >NUL 2>&1
  94. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" /v "AccentPalette" /t REG_BINARY /d "FFE5CEFFFFD3ABFFFEC691FFFFB978FFFFAB5EFFFF9E44FFFE8C21FF88179800" /f >NUL 2>&1
  95. reg add "HKCU\Software\Microsoft\Windows\DWM" /v "AccentColor" /t REG_DWORD /d "4286102015" /f >NUL 2>&1
  96. reg add "HKCU\Software\Microsoft\Windows\DWM" /v "ColorizationColor" /t REG_DWORD /d "3305093496" /f >NUL 2>&1
  97. reg add "HKCU\Software\Microsoft\Windows\DWM" /v "ColorizationAfterglow" /t REG_DWORD /d "3305093496" /f >NUL 2>&1
  98. reg add "HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" /v "StartColorMenu" /t REG_DWORD /d "4284394495" /f >NUL 2>&1
  99. reg add "HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" /v "AccentColorMenu" /t REG_DWORD /d "4286102015" /f >NUL 2>&1
  100. reg add "HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" /v "AccentPalette" /t REG_BINARY /d "FFE5CEFFFFD3ABFFFEC691FFFFB978FFFFAB5EFFFF9E44FFFE8C21FF88179800" /f >NUL 2>&1
  101. reg add "HKU\.DEFAULT\Software\Microsoft\Windows\DWM" /v "AccentColor" /t REG_DWORD /d "4286102015" /f >NUL 2>&1
  102. reg add "HKU\.DEFAULT\Software\Microsoft\Windows\DWM" /v "ColorizationColor" /t REG_DWORD /d "3305093496" /f >NUL 2>&1
  103. reg add "HKU\.DEFAULT\Software\Microsoft\Windows\DWM" /v "ColorizationAfterglow" /t REG_DWORD /d "3305093496" /f >NUL 2>&1
  104.  
  105. echo Setting Win32 Priority to sigma value
  106. reg add "HKLM\SYSTEM\CurrentControlSet\Control\PriorityControl" /v "Win32PrioritySeparation" /t REG_DWORD /d "4294918033" /f >NUL 2>&1
  107.  
  108. @REM echo Setting Nlasvc dependency
  109. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc" /v "DependOnService" /t REG_MULTI_SZ /d "NSI\0RpcSs\0TcpIp" /f >NUL 2>&1
  110. @REM reg delete "HKLM\SYSTEM\ControlSet001\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}" /v "LowerFilters" /f >NUL 2>&1
  111. @REM reg delete "HKLM\SYSTEM\ControlSet001\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}" /v "UpperFilters" /f >NUL 2>&1
  112. @REM reg delete "HKLM\SYSTEM\ControlSet001\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}" /v "LowerFilters" /f >NUL 2>&1
  113. :: ehstorclass
  114. @REM reg delete "HKLM\SYSTEM\ControlSet001\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F}" /v "UpperFilters" /f >NUL 2>&1
  115. :: volsnap
  116. @REM reg delete "HKLM\SYSTEM\ControlSet001\services\AudioSrv" /v "DependOnService" /f >NUL 2>&1
  117.  
  118. @REM echo Registry Cleanup
  119. @REM reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Telephony" /f >NUL 2>&1
  120. @REM reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers" /f >NUL 2>&1
  121. @REM reg delete "HKCU\Printers" /f >NUL 2>&1
  122. @REM reg delete "HKLM\SYSTEM\ControlSet001\Control\Print" /f >NUL 2>&1
  123. @REM reg delete "HKLM\SYSTEM\ControlSet002\Control\Print" /f >NUL 2>&1
  124.  
  125. @REM echo Disabling Spectre and Meltdown patches...
  126. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettings" /t REG_DWORD /d "1" /f >NUL 2>&1
  127. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverride" /t REG_DWORD /d "3" /f >NUL 2>&1
  128. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "FeatureSettingsOverrideMask" /t REG_DWORD /d "3" /f >NUL 2>&1
  129. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "EnableCfg" /t REG_DWORD /d "0" /f >NUL 2>&1
  130. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "DisableExceptionChainValidation" /t REG_DWORD /d "1" /f >NUL 2>&1
  131. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "KernelSEHOPEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  132. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel" /v "DisableTsx" /t REG_DWORD /d "1" /f >NUL 2>&1
  133. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v "ProtectionMode" /t REG_DWORD /d "0" /f >NUL 2>&1
  134. :: 23-06
  135. @REM reg add "HKLM\Software\Microsoft\Ole\AppCompat" /v "RequireIntegrityActivationAuthenticationLevel" /t REG_DWORD /d "0" /f >NUL 2>&1
  136. powershell set-ProcessMitigation -System -Disable DEP, StrictHandle, SEHOP >NUL 2>&1
  137.  
  138. echo Applying Power Settings
  139. powercfg -h off >NUL 2>&1
  140. :: 23-06
  141. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabledDefault" /t REG_DWORD /d "0" /f >NUL 2>&1
  142. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v "EventProcessorEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  143. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v "AwayModeEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  144.  
  145. echo Autoplay Tweaks
  146. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlersDefaultSelection\CameraAlternate\ShowPicturesOnArrival" /ve /t REG_SZ /d "MSTakeNoAction" /f >NUL 2>&1
  147. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlersDefaultSelection\StorageOnArrival" /ve /t REG_SZ /d "MSTakeNoAction" /f >NUL 2>&1
  148. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\UserChosenExecuteHandlers\CameraAlternate\ShowPicturesOnArrival" /ve /t REG_SZ /d "MSTakeNoAction" /f >NUL 2>&1
  149. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\UserChosenExecuteHandlers\StorageOnArrival" /ve /t REG_SZ /d "MSTakeNoAction" /f >NUL 2>&1
  150.  
  151. @REM echo Disabling Remote Terminal Services Logons to the Server
  152. @REM reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "WinStationsDisabled" /t REG_SZ /d "1" /f >NUL 2>&1
  153.  
  154. @REM echo Disabling Remote Font Boot Cache
  155. @REM reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize" /v "DisableRemoteFontBootCache" /t REG_DWORD /d "1" /f >NUL 2>&1
  156. @REM reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\GRE_Initialize" /v "DisableRemoteFontBootCache" /t REG_DWORD /d "1" /f >NUL 2>&1
  157. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\MUI\StringCacheSettings" /v "StringCacheGeneration" /t REG_DWORD /d "0" /f >NUL 2>&1
  158.  
  159. echo Disabling Null Session (restrictanonymous)
  160. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v "disabledomaincreds" /t REG_DWORD /d "1" /f >NUL 2>&1
  161. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v "restrictanonymous" /t REG_DWORD /d "1" /f >NUL 2>&1
  162.  
  163. @REM echo Disabling Component Based Servicing Logs and DCOM
  164. @REM reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v "EnableLog" /t REG_DWORD /d "0" /f >NUL 2>&1
  165. @REM reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v "EnableDpxLog" /t REG_DWORD /d "0" /f >NUL 2>&1
  166. @REM reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v "EnableLog" /t REG_DWORD /d "0" /f >NUL 2>&1
  167. @REM reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v "EnableDpxLog" /t REG_DWORD /d "0" /f >NUL 2>&1
  168. @REM reg add "HKLM\SOFTWARE\Microsoft\Ole" /v "EnableDCOM" /t REG_SZ /d "N" /f >NUL 2>&1
  169. @REM reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Ole" /v "EnableDCOM" /t REG_SZ /d "N" /f >NUL 2>&1
  170.  
  171. echo Storage Tweaks
  172. :: Disable HIPM and DIPM, HDD Parking
  173. FOR /F "eol=E" %%a in ('REG QUERY "HKLM\SYSTEM\CurrentControlSet\Services" /S /F "EnableHIPM"^| FINDSTR /V "EnableHIPM"') DO (
  174. REG ADD "%%a" /F /V "EnableHIPM" /T REG_DWORD /d 0 >NUL 2>&1
  175. REG ADD "%%a" /F /V "EnableDIPM" /T REG_DWORD /d 0 >NUL 2>&1
  176. REG ADD "%%a" /F /V "EnableHDDParking" /T REG_DWORD /d 0 >NUL 2>&1
  177.  
  178. FOR /F "tokens=*" %%z IN ("%%a") DO (
  179. SET STR=%%z
  180. SET STR=!STR:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\=!
  181. ECHO Disabling HIPM and DIPM in !STR!
  182. )
  183. )
  184.  
  185. :: Set all IoLatencyCaps to 0
  186. FOR /F "eol=E" %%a in ('REG QUERY "HKLM\SYSTEM\CurrentControlSet\Services" /S /F "IoLatencyCap"^| FINDSTR /V "IoLatencyCap"') DO (
  187. REG ADD "%%a" /F /V "IoLatencyCap" /T REG_DWORD /d 0 >NUL 2>&1
  188.  
  189. FOR /F "tokens=*" %%z IN ("%%a") DO (
  190. SET STR=%%z
  191. SET STR=!STR:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\=!
  192. SET STR=!STR:\Parameters=!
  193. ECHO Setting IoLatencyCap to 0 in !STR!
  194. )
  195. )
  196.  
  197. :: Disable StorPort idle
  198. for /f "tokens=*" %%s in ('reg query "HKLM\System\CurrentControlSet\Enum" /S /F "StorPort" ^| findstr /e "StorPort"') do Reg add "%%s" /v "EnableIdlePowerManagement" /t REG_DWORD /d "0" /f >NUL 2>&1
  199.  
  200. :: Disable NTFS Last Access Timestamp
  201. fsutil behavior set disablelastaccess 1 >NUL 2>&1
  202. @REM fsutil repair set C: 0 > NUL 2>&1
  203. fsutil behavior set disablespotcorruptionhandling 1 > NUL 2>&1
  204. fsutil behavior set quotanotify 86400 > NUL 2>&1
  205. @REM reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\FileSystem" /v "NtfsDisableLastAccessUpdate" /t REG_DWORD /d 1 /f >NUL 2>&1
  206.  
  207. :: Disable Write Cache Buffer
  208. for /f "tokens=*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Enum\SCSI"^| findstr "HKEY"') do (
  209. for /f "tokens=*" %%a in ('reg query "%%i"^| findstr "HKEY"') do reg add "%%a\Device Parameters\Disk" /v "CacheIsPowerProtected" /t REG_DWORD /d "1" /f > NUL 2>&1
  210. )
  211. for /f "tokens=*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Enum\SCSI"^| findstr "HKEY"') do (
  212. for /f "tokens=*" %%a in ('reg query "%%i"^| findstr "HKEY"') do reg add "%%a\Device Parameters\Disk" /v "UserWriteCacheSetting" /t REG_DWORD /d "1" /f > NUL 2>&1
  213. )
  214.  
  215. echo Setting CSRSS Priority to High Priority
  216. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\csrss.exe\PerfOptions" /v "CpuPriorityClass" /t REG_DWORD /d "3" /f >NUL 2>&1
  217. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\csrss.exe\PerfOptions" /v "IoPriority" /t REG_DWORD /d "3" /f >NUL 2>&1
  218. reg add "HKCU\Control Panel\Desktop" /v "Wallpaper" /t REG_SZ /d "C:\Windows\System32\Fox.png" /f >NUL 2>&1
  219.  
  220. echo Network Tweaks
  221. for /f "tokens=*" %%i in ('powershell -Command "Get-NetAdapter | Select-Object -ExpandProperty InterfaceGuid"') do (
  222. reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%%i" /v "TcpAckFrequency" /t REG_DWORD /d "1" /f >nul 2>&1
  223. reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%%i" /v "TcpDelAckTicks" /t REG_DWORD /d "0" /f >nul 2>&1
  224. reg add "HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%%i" /v "TCPNoDelay" /t REG_DWORD /d "1" /f >nul 2>&1
  225. )
  226. powershell Set-NetAdapterBinding -Name * -ComponentID ms_msclient, ms_server -Enabled $false >nul 2>&1
  227.  
  228. @REM echo Disabling USB Idle
  229. @REM for %%a in (
  230. @REM EnhancedPowerManagementEnabled
  231. @REM AllowIdleIrpInD3
  232. @REM EnableSelectiveSuspend
  233. @REM DeviceSelectiveSuspended
  234. @REM SelectiveSuspendEnabled
  235. @REM SelectiveSuspendOn
  236. @REM EnumerationRetryCount
  237. @REM ExtPropDescSemaphore
  238. @REM WaitWakeEnabled
  239. @REM D3ColdSupported
  240. @REM WdfDirectedPowerTransitionEnable
  241. @REM EnableIdlePowerManagement
  242. @REM IdleInWorkingState
  243. @REM IoLatencyCap
  244. @REM ) do for /f "delims=" %%b in ('reg query "HKLM\SYSTEM\CurrentControlSet\Enum" /s /f "%%a" ^| findstr "HKEY"') do reg add "%%b" /v "%%a" /t REG_DWORD /d "0" /f >NUL 2>&1
  245.  
  246. @REM powershell -file "C:\Windows\DisablePowersavingAmit.ps1" >NUL 2>&1
  247.  
  248. echo GPU Tweaks
  249. reg add "HKLM\SYSTEM\ControlSet001\Control\GraphicsDrivers" /v "TdrLevel" /t REG_DWORD /d "0" /f >NUL 2>&1
  250. reg add "HKLM\SYSTEM\ControlSet001\Control\GraphicsDrivers" /v "TdrDelay" /t REG_DWORD /d "0" /f >NUL 2>&1
  251. reg add "HKLM\SYSTEM\ControlSet001\Control\GraphicsDrivers" /v "TdrDdiDelay" /t REG_DWORD /d "0" /f >NUL 2>&1
  252. reg add "HKLM\SYSTEM\ControlSet001\Control\GraphicsDrivers" /v "TdrDebugMode" /t REG_DWORD /d "0" /f >NUL 2>&1
  253. reg add "HKLM\SYSTEM\ControlSet001\Control\GraphicsDrivers" /v "TdrLimitTime" /t REG_DWORD /d "0" /f >NUL 2>&1
  254. reg add "HKLM\SYSTEM\ControlSet001\Control\GraphicsDrivers" /v "TdrLimitCount" /t REG_DWORD /d "0" /f >NUL 2>&1
  255. reg add "HKLM\SYSTEM\ControlSet001\Control\GraphicsDrivers" /v "DisableBadDriverCheckForHwProtection" /t REG_DWORD /d "1" /f >NUL 2>&1
  256.  
  257. @REM echo Disabling Gamebar, Fullscreen Optimization
  258. @REM reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "MaximumRecordLength" /t REG_QWORD /d "0x00d088c310000000" /f >NUL 2>&1
  259. @REM reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "SystemAudioGain" /t REG_QWORD /d "0x1027000000000000" /f >NUL 2>&1
  260. @REM reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "MicrophoneGain" /t REG_QWORD /d "0x1027000000000000" /f >NUL 2>&1
  261. @REM reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "KGLRevision" /t REG_DWORD /d "1824" /f >NUL 2>&1
  262. @REM reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "KGLToGCSUpdatedRevision" /t REG_DWORD /d "1824" /f >NUL 2>&1
  263. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "AudioEncodingBitrate" /t REG_DWORD /d "1" /f >NUL 2>&1
  264. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "AudioCaptureEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  265. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "CustomVideoEncodingBitrate" /t REG_DWORD /d "1" /f >NUL 2>&1
  266. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "CustomVideoEncodingHeight" /t REG_DWORD /d "1" /f >NUL 2>&1
  267. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "CustomVideoEncodingWidth" /t REG_DWORD /d "1" /f >NUL 2>&1
  268. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "AppCaptureEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  269. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "HistoricalBufferLength" /t REG_DWORD /d "0" /f >NUL 2>&1
  270. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "HistoricalBufferLengthUnit" /t REG_DWORD /d "0" /f >NUL 2>&1
  271. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "HistoricalCaptureEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  272. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "HistoricalCaptureOnBatteryAllowed" /t REG_DWORD /d "0" /f >NUL 2>&1
  273. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "HistoricalCaptureOnWirelessDisplayAllowed" /t REG_DWORD /d "0" /f >NUL 2>&1
  274. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VideoEncodingBitrateMode" /t REG_DWORD /d "0" /f >NUL 2>&1
  275. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VideoEncodingResolutionMode" /t REG_DWORD /d "0" /f >NUL 2>&1
  276. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VideoEncodingFrameRateMode" /t REG_DWORD /d "0" /f >NUL 2>&1
  277. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "EchoCancellationEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  278. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "CursorCaptureEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  279. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKToggleGameBar" /t REG_DWORD /d "0" /f >NUL 2>&1
  280. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKMToggleGameBar" /t REG_DWORD /d "0" /f >NUL 2>&1
  281. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKSaveHistoricalVideo" /t REG_DWORD /d "0" /f >NUL 2>&1
  282. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKMSaveHistoricalVideo" /t REG_DWORD /d "0" /f >NUL 2>&1
  283. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKToggleRecording" /t REG_DWORD /d "0" /f >NUL 2>&1
  284. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKMToggleRecording" /t REG_DWORD /d "0" /f >NUL 2>&1
  285. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKTakeScreenshot" /t REG_DWORD /d "0" /f >NUL 2>&1
  286. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKMTakeScreenshot" /t REG_DWORD /d "0" /f >NUL 2>&1
  287. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKToggleRecordingIndicator" /t REG_DWORD /d "0" /f >NUL 2>&1
  288. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKMToggleRecordingIndicator" /t REG_DWORD /d "0" /f >NUL 2>&1
  289. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKToggleMicrophoneCapture" /t REG_DWORD /d "0" /f >NUL 2>&1
  290. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKMToggleMicrophoneCapture" /t REG_DWORD /d "0" /f >NUL 2>&1
  291. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKToggleCameraCapture" /t REG_DWORD /d "0" /f >NUL 2>&1
  292. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKMToggleCameraCapture" /t REG_DWORD /d "0" /f >NUL 2>&1
  293. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKToggleBroadcast" /t REG_DWORD /d "0" /f >NUL 2>&1
  294. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "VKMToggleBroadcast" /t REG_DWORD /d "0" /f >NUL 2>&1
  295. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "MicrophoneCaptureEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  296. reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  297. reg add "HKCU\System\GameConfigStore" /v "GameDVR_FSEBehaviorMode" /t REG_DWORD /d "2" /f >NUL 2>&1
  298. @REM reg add "HKCU\System\GameConfigStore" /v "GameDVR_HonorUserFSEBehaviorMode" /t REG_DWORD /d "1" /f >NUL 2>&1
  299. reg add "HKCU\System\GameConfigStore" /v "GameDVR_FSEBehavior" /t REG_DWORD /d "2" /f >NUL 2>&1
  300. @REM reg add "HKCU\System\GameConfigStore" /v "GameDVR_DXGIHonorFSEWindowsCompatible" /t REG_DWORD /d "1" /f >NUL 2>&1
  301. @REM reg delete "HKCU\System\GameConfigStore\Children" /f >NUL 2>&1
  302. @REM reg delete "HKCU\System\GameConfigStore\Parents" /f >NUL 2>&1
  303. @REM reg add "HKEY_USERS\.DEFAULT\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  304. @REM reg add "HKEY_USERS\.DEFAULT\System\GameConfigStore" /v "GameDVR_FSEBehaviorMode" /t REG_DWORD /d "2" /f >NUL 2>&1
  305. @REM reg add "HKEY_USERS\.DEFAULT\System\GameConfigStore" /v "GameDVR_HonorUserFSEBehaviorMode" /t REG_DWORD /d "1" /f >NUL 2>&1
  306. @REM reg add "HKEY_USERS\.DEFAULT\System\GameConfigStore" /v "GameDVR_FSEBehavior" /t REG_DWORD /d "2" /f >NUL 2>&1
  307. @REM reg add "HKEY_USERS\.DEFAULT\System\GameConfigStore" /v "GameDVR_DXGIHonorFSEWindowsCompatible" /t REG_DWORD /d "1" /f >NUL 2>&1
  308. @REM reg delete "HKEY_USERS\.DEFAULT\System\GameConfigStore\Children" /f >NUL 2>&1
  309. @REM reg delete "HKEY_USERS\.DEFAULT\System\GameConfigStore\Parents" /f >NUL 2>&1
  310. @REM reg add "HKLM\Software\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR" /v "value" /t REG_DWORD /d "0" /f >NUL 2>&1
  311.  
  312. echo Disabling DMA Remapping
  313. @REM reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\DmaGuard\DeviceEnumerationPolicy" /v "value" /t REG_DWORD /d "2" /f >NUL 2>&1
  314. reg add "HKLM\System\ControlSet001\Services\pci\Parameters" /v "DmaRemappingCompatible" /t REG_DWORD /d "0" /f >NUL 2>&1
  315. reg add "HKLM\SYSTEM\ControlSet001\Services\pci\Parameters" /v "DmaRemappingOnHiberPath" /t REG_DWORD /d "0" /f >NUL 2>&1
  316. reg add "HKLM\System\ControlSet001\Services\storahci\Parameters" /v "DmaRemappingCompatible" /t REG_DWORD /d "0" /f >NUL 2>&1
  317. reg add "HKLM\SYSTEM\ControlSet001\Services\storahci\Parameters" /v "DmaRemappingOnHiberPath" /t REG_DWORD /d "0" /f >NUL 2>&1
  318. reg add "HKLM\System\ControlSet001\Services\stornvme\Parameters" /v "DmaRemappingCompatible" /t REG_DWORD /d "0" /f >NUL 2>&1
  319. reg add "HKLM\SYSTEM\ControlSet001\Services\stornvme\Parameters" /v "DmaRemappingOnHiberPath" /t REG_DWORD /d "0" /f >NUL 2>&1
  320. reg add "HKLM\System\ControlSet001\Services\USBXHCI\Parameters" /v "DmaRemappingCompatibleSelfhost" /t REG_DWORD /d "0" /f >NUL 2>&1
  321. reg add "HKLM\System\ControlSet001\Services\USBXHCI\Parameters" /v "DmaRemappingCompatible" /t REG_DWORD /d "0" /f >NUL 2>&1
  322. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0000\Parameters" /v "DmaRemappingCompatible" /t REG_DWORD /d "0" /f >NUL 2>&1
  323. :: for /f "tokens=1" %%i in ('driverquery') do reg add "HKLM\SYSTEM\CurrentControlSet\Services\%%i\Parameters" /v "DmaRemappingCompatible" /t REG_DWORD /d "0" /f >NUL 2>&1
  324. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "legalnoticecaption" /t REG_SZ /d "Welcome to FoxOS, Custom Windows for Gaming. The ISO Was Made by CatGamerOP" /f >NUL 2>&1
  325. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "legalnoticetext" /t REG_SZ /d "The ISO is free and is NOT for sale. You can download it from the official FoxOS Discord Server https://discord.gg/4Gg8n6WhPN. IF YOU PAID FOR THIS ISO, YOU WERE SCAMMED." /f >NUL 2>&1
  326.  
  327. echo BCDedit Tweaks
  328. bcdedit /set {globalsettings} custom:16000067 true >NUL 2>&1
  329. bcdedit /set {globalsettings} custom:16000068 true >NUL 2>&1
  330. bcdedit /set {globalsettings} custom:16000069 true >NUL 2>&1
  331. bcdedit /set {current} description "FoxOS W11 23H2" >NUL 2>&1
  332. bcdedit /set bootmenupolicy legacy >NUL 2>&1
  333. bcdedit /set quietboot Yes >NUL 2>&1
  334. bcdedit /set bootux Disabled >NUL 2>&1
  335. bcdedit /set bootlog no >NUL 2>&1
  336. bcdedit /timeout 10 >NUL 2>&1
  337. bcdedit /set disabledynamictick Yes >NUL 2>&1
  338. @REM bcdedit /event off >NUL 2>&1
  339. @REM bcdedit /bootdebug off >NUL 2>&1
  340. @REM bcdedit /set debug No >NUL 2>&1
  341. @REM bcdedit /set ems No >NUL 2>&1
  342. @REM bcdedit /set bootems No >NUL 2>&1
  343. bcdedit /set hypervisorlaunchtype Off >NUL 2>&1
  344. bcdedit /set vsmlaunchtype Off >NUL 2>&1
  345. @REM bcdedit /set tpmbootentropy ForceDisable >NUL 2>&1
  346. @REM bcdedit /set nx alwaysoff >NUL 2>&1
  347. @REM bcdedit /set integrityservices disable >NUL 2>&1
  348. @REM bcdedit /set allowedinmemorysettings 0 >NUL 2>&1
  349. @REM bcdedit /set perfmem 0 >NUL 2>&1
  350. @REM bcdedit /set isolatedcontext No >NUL 2>&1
  351. @REM bcdedit /set recoveryenabled No >NUL 2>&1
  352. @REM bcdedit /deletevalue useplatformclock >NUL 2>&1
  353. @REM bcdedit /deletevalue usefirmwarepcisettings >NUL 2>&1
  354. :: bcdedit /set useplatformtick yes >NUL 2>&1
  355. :: Makes polling rate worse
  356. :: bcdedit /set tscsyncpolicy legacy >NUL 2>&1
  357. :: Kept Windows Default
  358.  
  359. @REM echo Deleting Obsolete Autoruns Entries
  360. @REM reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Font Drivers" /v "Adobe Type Manager" /f >NUL 2>&1
  361. @REM reg delete "HKLM\System\ControlSet001\Control\Terminal Server\Wds\rdpwd" /v "StartupPrograms" /f >NUL 2>&1
  362.  
  363. echo Services Tweaks
  364. reg add "HKLM\SYSTEM\CurrentControlSet\services\dmwappushservice" /v "Start" /t REG_DWORD /d "4" /f >NUL 2>&1
  365. @REM reg add "HKLM\SYSTEM\CurrentControlSet\services\iphlpsvc" /v "Start" /t REG_DWORD /d "4" /f >NUL 2>&1
  366. @REM reg add "HKLM\SYSTEM\CurrentControlSet\services\QWAVE" /v "Start" /t REG_DWORD /d "4" /f >NUL 2>&1
  367. @REM reg add "HKLM\SYSTEM\CurrentControlSet\services\Themes" /v "Start" /t REG_DWORD /d "4" / >NUL 2>&1
  368. @REM reg add "HKLM\SYSTEM\CurrentControlSet\services\WSearch" /v "Start" /t REG_DWORD /d "4" /f >NUL 2>&1
  369.  
  370. echo Drivers Tweaks
  371. reg add "HKLM\SYSTEM\CurrentControlSet\services\Beep" /v "Start" /t REG_DWORD /d "4" /f >NUL 2>&1
  372. reg add "HKLM\SYSTEM\CurrentControlSet\services\GpuEnergyDrv" /v "Start" /t REG_DWORD /d "4" /f >NUL 2>&1
  373. reg add "HKLM\SYSTEM\CurrentControlSet\services\npsvctrig" /v "Start" /t REG_DWORD /d "4" /f >NUL 2>&1
  374. @REM reg add "HKLM\SYSTEM\CurrentControlSet\services\vwififlt" /v "Start" /t REG_DWORD /d "4" /f >NUL 2>&1
  375. reg add "HKLM\SYSTEM\CurrentControlSet\services\wanarp" /v "Start" /t REG_DWORD /d "4" /f >NUL 2>&1
  376. reg add "HKLM\SYSTEM\CurrentControlSet\services\Wanarpv6" /v "Start" /t REG_DWORD /d "4" /f >NUL 2>&1
  377. @REM sc config luafv start= disabled >NUL 2>&1
  378.  
  379. @REM echo Restoring Default Photo Viewer
  380. @REM for %%i in (tif tiff bmp dib gif jfif jpe jpeg jpg jxr png) do (
  381. @REM reg add "HKLM\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" /v ".%%~i" /t REG_SZ /d "PhotoViewer.FileAssoc.Tiff" /f) >NUL 2>&1
  382. @REM for %%a in (tif tiff bmp dib gif jfif jpe jpeg jpg jxr png) do (
  383. @REM reg add "HKCU\SOFTWARE\Classes.%%~a" /ve /t REG_SZ /d "PhotoViewer.FileAssoc.Tiff" /f) >NUL 2>&1
  384.  
  385. echo Deleting Devices in Device Manager
  386. @REM DevManView /disable "Microsoft Radio Device Enumeration Bus" >NUL 2>&1
  387. @REM DevManView /disable "Microsoft RRAS Root Enumerator" >NUL 2>&1
  388. @REM DevManView /disable "Microsoft Device Association Root Enumerator" >NUL 2>&1
  389. DevManView /uninstall "Composite Bus Enumerator" >NUL 2>&1
  390. DevManView /uninstall "NDIS Virtual Network Adapter Enumerator" >NUL 2>&1
  391. DevManView /uninstall "UMBus Root Bus Enumerator" >NUL 2>&1
  392. DevManView /uninstall "Microsoft Virtual Drive Enumerator Driver" >NUL 2>&1
  393. @REM DevManView /uninstall "File as Volume Driver" >NUL 2>&1
  394. DevManView /uninstall "Microsoft Kernel Debug Network Adapter" >NUL 2>&1
  395. DevManView /uninstall "Microsoft Virtual Drive Enumerator" >NUL 2>&1
  396. DevManView /uninstall "Microsoft Hyper-V Virtualization Infrastructure Driver" >NUL 2>&1
  397. DevManView /uninstall "Remote Desktop Device Redirector Bus" >NUL 2>&1
  398. sc delete CompositeBus >NUL 2>&1
  399. sc delete NdisVirtualBus >NUL 2>&1
  400. sc delete umbus >NUL 2>&1
  401. sc delete vdrvroot >NUL 2>&1
  402. sc delete Vid >NUL 2>&1
  403. sc delete rdpbus >NUL 2>&1
  404.  
  405. echo Disabling Unnecessary Scheduled Tasks
  406. for %%i in ("Application Experience\Microsoft Compatibility Appraiser" "Application Experience\ProgramDataUpdater"
  407. "Application Experience\StartupAppTask" "Customer Experience Improvement Program\Consolidator"
  408. "Customer Experience Improvement Program\KernelCeipTask" "Customer Experience Improvement Program\UsbCeip"
  409. "Customer Experience Improvement Program\Uploader" "Autochk\Proxy" "CloudExperienceHost\CreateObjectTask"
  410. "DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" "DiskFootprint\Diagnostics"
  411. "UpdateOrchestrator\Schedule Scan" "WindowsUpdate\Scheduled Start" "Servicing\StartComponentCleanup"
  412. "Recovery Environment\VerifyWinRE" "EDP\StorageCardEncryption Task" "BitLocker\BitLocker Encrypt All Drives"
  413. "BitLocker\BitLocker MDM policy Refresh" "ApplicationData\DsSvcCleanup" "International\Synchronize Language Settings") do schtasks /change /tn "\Microsoft\Windows\%%~i" /disable >NUL 2>&1
  414.  
  415. echo Disabling Unnecessary Scheduled Tasks 2
  416. for %%i in ("Application Experience\SdbinstMergeDbTask" "InstallService\ScanForUpdates" "InstallService\ScanForUpdatesAsUser" "InstallService\SmartRetry"
  417. "PI\SecureBootEncodeUEFI" "PI\Secure-Boot-Update" "PI\Sqm-Tasks" "Registry\RegIdleBackup" "Shell\ThemesSyncedImageDownload"
  418. "SoftwareProtectionPlatform\SvcRestartTask") do schtasks /change /tn "\Microsoft\Windows\%%~i" /disable >NUL 2>&1
  419. schtasks /delete /tn "\Microsoft\Windows\Application Experience\AitAgent" /f >NUL 2>&1
  420.  
  421. echo Disabling Unnecessary Scheduled Tasks 3
  422. for %%i in ("ApplicationData\appuriverifierdaily" "ApplicationData\appuriverifierinstall" "AppxDeploymentClient\Pre-staged app cleanup"
  423. "CertificateServicesClient\UserTask-Roam" "DUSM\dusmtask" "Data Integrity Scan\Data Integrity Scan for Crash Recovery"
  424. "Data Integrity Scan\Data Integrity Scan" "Diagnosis\Scheduled" "DiskCleanup\SilentCleanup" "DiskFootprint\StorageSense"
  425. "License Manager\TempSignedLicenseExchange" "Location\WindowsActionDialog" "Management\Provisioning\Logon"
  426. "NlaSvc\WiFiTask" "RetailDemo\CleanupOfflineContent" "Shell\FamilySafetyRefreshTask" "Shell\IndexerAutomaticMaintenance"
  427. "SoftwareProtectionPlatform\SvcRestartTaskLogon" "SoftwareProtectionPlatform\SvcRestartTaskNetwork" "SpacePort\SpaceAgentTask"
  428. "Speech\SpeechModelDownloadTask" "WCM\WiFiTask" "WDI\ResolutionHost" "WOF\WIM-Hash-Management" "WOF\WIM-Hash-Validation"
  429. "Windows Filtering Platform\BfeOnServiceStartTypeChange" "StateRepository\MaintenanceTasks" "MemoryDiagnostic\ProcessMemoryDiagnosticEvents"
  430. "MemoryDiagnostic\RunFullMemoryDiagnostic" "Ras\MobilityManager" "PushToInstall\LoginCheck" "Time Synchronization\SynchronizeTime"
  431. "Time Synchronization\ForceSynchronizeTime" "Time Zone\SynchronizeTimeZone" "Wininet\CacheTask") do schtasks /change /tn "\Microsoft\Windows\%%~i" /disable >NUL 2>&1
  432.  
  433. echo Disabling Unnecessary Scheduled Tasks 4
  434. schtasks /change /tn "MicrosoftEdgeUpdateTaskMachineCore" /disable >NUL 2>&1
  435. schtasks /change /tn "MicrosoftEdgeUpdateTaskMachineUA" /disable >NUL 2>&1
  436. for %%i in ("WindowsUpdate\Refresh Group Policy Cache" "WaasMedic\PerformRemediation" "UpdateOrchestrator\UUS Failover Task"
  437. "UpdateOrchestrator\StartOobeAppsScanAfterUpdate" "UpdateOrchestrator\StartOobeAppsScan_LicenseAccepted" "UpdateOrchestrator\Start Oobe Expedite Work"
  438. "UpdateOrchestrator\Schedule Work" "UpdateOrchestrator\Schedule Scan Static Task" "UpdateOrchestrator\Schedule Scan"
  439. "UpdateOrchestrator\Report policies") do schtasks /change /tn "\Microsoft\Windows\%%~i" /disable >NUL 2>&1
  440.  
  441. echo Renaming Partition
  442. label C:FoxOS W11 23H2 >NUL 2>&1
  443.  
  444. @REM echo Removing Optional Features
  445. @REM DISM /Online /Remove-Capability /CapabilityName:Browser.InternetExplorer~~~~0.0.11.0 /norestart /quiet >NUL 2>&1
  446. @REM DISM /Online /Remove-Capability /CapabilityName:MathRecognizer~~~~0.0.1.0 /norestart /quiet >NUL 2>&1
  447. @REM DISM /Online /Remove-Capability /CapabilityName:Microsoft.Windows.PowerShell.ISE~~~~0.0.1.0 /norestart /quiet >NUL 2>&1
  448. @REM DISM /Online /Remove-Capability /CapabilityName:OneCoreUAP.OneSync~~~~0.0.1.0 /norestart /quiet >NUL 2>&1
  449.  
  450. echo Windows 11 Stuff
  451. reg add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v "AllowNewsAndInterests" /t REG_DWORD /d "0" /f >NUL 2>&1
  452. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowTaskViewButton" /t REG_DWORD /d "0" /f >NUL 2>&1
  453. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Control\CI\Config" /v "VulnerableDriverBlocklistEnable" /t REG_DWORD /d "0" /f >NUL 2>&1 breaks the Finals
  454. :: Changing Context Menu to W10
  455. @REM reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /ve /t REG_SZ /d "" /f >NUL 2>&1
  456. @REM reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d "0" /f >NUL 2>&1
  457. @REM reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarDa" /t REG_DWORD /d "0" /f >NUL 2>&1
  458.  
  459. echo Disabling Visual Effects
  460. reg add "HKCU\Control Panel\Desktop" /v "FontSmoothing" /t REG_SZ /d "2" /f >NUL 2>&1
  461. reg add "HKCU\Control Panel\Desktop" /v "DragFullWindows" /t REG_SZ /d "0" /f >NUL 2>&1
  462. reg add "HKCU\Control Panel\Desktop\WindowMetrics" /v "MinAnimate" /t REG_SZ /d "0" /f >NUL 2>&1
  463. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ListviewShadow" /t REG_DWORD /d "0" /f >NUL 2>&1
  464. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarAnimations" /t REG_DWORD /d "0" /f >NUL 2>&1
  465. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ListviewAlphaSelect" /t REG_DWORD /d "0" /f >NUL 2>&1
  466. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" /v "VisualFXSetting" /t REG_DWORD /d "3" /f >NUL 2>&1
  467. reg add "HKCU\Software\Microsoft\Windows\DWM" /v "EnableAeroPeek" /t REG_DWORD /d "0" /f >NUL 2>&1
  468. reg add "HKCU\Software\Microsoft\Windows\DWM" /v "AlwaysHibernateThumbnails" /t REG_DWORD /d "0" /f >NUL 2>&1
  469. reg add "HKCU\Control Panel\Desktop" /v "UserPreferencesMask" /t REG_BINARY /d "9012038010000000" /f >NUL 2>&1
  470.  
  471. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v "AllowOnlineTips" /t "REG_DWORD" /d "0" /f >NUL 2>&1
  472.  
  473. echo Deleting UserAssist Hashes (TrackProgs)
  474. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /t REG_DWORD /d "0" /f >NUL 2>&1
  475. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /t REG_DWORD /d "0" /f >NUL 2>&1
  476. reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /t REG_DWORD /d "0" /f >NUL 2>&1
  477. reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackProgs" /t REG_DWORD /d "0" /f >NUL 2>&1
  478. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowRecommendations" /t REG_DWORD /d "0" /f >NUL 2>&1
  479. reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "EnableTransparency" /t REG_DWORD /d "0" /f >NUL 2>&1
  480.  
  481. for /f "tokens=*" %%k in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist"') do (
  482. reg delete "%%k" /f >NUL 2>&1
  483. )
  484.  
  485. echo Disabling Reserved Storage (amitxv)
  486. DISM /Online /Set-ReservedStorageState /State:Disabled >NUL 2>&1
  487.  
  488. echo Disabling Scheduled Defrag
  489. @REM reg add "HKLM\Software\Microsoft\Dfrg\TaskSettings" /v "fAllVolumes" /t REG_DWORD /d "1" /f >NUL 2>&1
  490. @REM reg add "HKLM\Software\Microsoft\Dfrg\TaskSettings" /v "fExclude" /t REG_DWORD /d "0" /f >NUL 2>&1
  491. @REM reg add "HKLM\Software\Microsoft\Dfrg\TaskSettings" /v "Volumes" /t REG_SZ /d " " /f >NUL 2>&1
  492. @REM reg add "HKLM\Software\Microsoft\Dfrg\TaskSettings" /v "TaskFrequency" /t REG_DWORD /d "3" /f >NUL 2>&1
  493. @REM reg add "HKLM\Software\Microsoft\Dfrg\TaskSettings" /v "fDeadlineEnabled" /t REG_DWORD /d "1" /f >NUL 2>&1
  494. schtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /disable >NUL 2>&1
  495. :: NOT APPLIED
  496.  
  497. @REM echo Removing Microcode Patches TEST ICACLS
  498. @REM takeown /f "\System32\mcupdate_GenuineIntel.dll" >NUL 2>&1
  499. @REM takeown /f "\System32\mcupdate_AuthenticAMD.dll" >NUL 2>&1
  500. @REM icacls "\System32\mcupdate_GenuineIntel.dll" /grant "":F /t >NUL 2>&1
  501. @REM icacls "\System32\mcupdate_AuthenticAMD.dll" /grant "":F /t >NUL 2>&1
  502. @REM del /s /q /f "\System32\mcupdate_GenuineIntel.dll" >NUL 2>&1
  503. @REM del /s /q /f "\System32\mcupdate_AuthenticAMD.dll" >NUL 2>&1
  504.  
  505. echo Disabling Firewall
  506. reg add "HKLM\System\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\PublicProfile" /v "DisableNotifications" /t REG_DWORD /d "1" /f >NUL 2>&1
  507. reg add "HKLM\System\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile" /v "DisableNotifications" /t REG_DWORD /d "1" /f >NUL 2>&1
  508. @REM reg add "HKLM\System\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\PublicProfile" /v "EnableFirewall" /t REG_DWORD /d "0" /f >NUL 2>&1
  509. @REM reg add "HKLM\System\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile" /v "EnableFirewall" /t REG_DWORD /d "0" /f >NUL 2>&1
  510. @REM NetSh Advfirewall set allprofiles state off >NUL 2>&1
  511.  
  512. @REM echo Disabling LogPages
  513. @REM reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Windows\Win32kWPP\Parameters" /v "LogPages" /t REG_DWORD /d "0" /f >NUL 2>&1
  514. @REM reg add "HKLM\Software\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Windows\Win32kWPP\Parameters" /v "LogPages" /t REG_DWORD /d "0" /f >NUL 2>&1
  515. @REM reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Windows\Win32knsWPP\Parameters" /v "LogPages" /t REG_DWORD /d "0" /f >NUL 2>&1
  516. @REM reg add "HKLM\Software\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Windows\Win32knsWPP\Parameters" /v "LogPages" /t REG_DWORD /d "0" /f >NUL 2>&1
  517. @REM reg add "HKLM\System\ControlSet001\Services\USBHUB3\Parameters" /v "LogPages" /t REG_DWORD /d "0" /f >NUL 2>&1
  518. @REM reg add "HKLM\System\ControlSet001\Services\USBHUB3\Parameters\Wdf" /v "LogPages" /t REG_DWORD /d "0" /f >NUL 2>&1
  519. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Services\kbdhid\Parameters" /v "LogPages" /t REG_DWORD /d "0" /f >nul 2>&1
  520. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\Parameters" /v "LogPages" /t REG_DWORD /d "0" /f >nul 2>&1
  521. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Services\mouclass\Parameters" /v "LogPages" /t REG_DWORD /d "0" /f >nul 2>&1
  522. @REM reg add "HKLM\SYSTEM\CurrentControlSet\Services\mouhid\Parameters" /v "LogPages" /t REG_DWORD /d "0" /f >nul 2>&1
  523.  
  524. @REM echo Disabling GamebarPresenceWriter
  525. @REM takeown /f "C:\Windows\System32\GameBarPresenceWriter.exe" >NUL 2>&1
  526. @REM icacls "C:\Windows\System32\GameBarPresenceWriter.exe" /grant ":F" >NUL 2>&1
  527. @REM move C:\Windows\System32\GameBarPresenceWriter.exe C:\Windows >NUL 2>&1
  528. @REM subinacl /regkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter /setowner=
  529. @REM reg add "HKLM\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter" /v "ActivationType" /t REG_DWORD /d "0" /f >NUL 2>&1
  530. :: NOT APPLIED
  531.  
  532. echo Windows Hardening
  533. :: Disabling RPC usage from a remote asset interacting with services
  534. @REM reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "DisableRemoteScmEndpoints" /t REG_DWORD /d 1 /f >NUL 2>&1
  535. :: Disabling RPC usage from a remote asset interacting with scheduled tasks
  536. @REM reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule" /v "DisableRpcOverTcp" /t REG_DWORD /d 1 /f >NUL 2>&1
  537. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v "restrictanonymoussam" /t REG_DWORD /d 1 /f >NUL 2>&1
  538. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v "restrictanonymous" /t REG_DWORD /d 1 /f >NUL 2>&1
  539. :: Prevent sharing of local drives via Remote Desktop Session Hosts
  540. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "fDisableCdm" /t REG_DWORD /d 1 /f >NUL 2>&1
  541. :: Disable solicited remote assistance
  542. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "fAllowToGetHelp" /t REG_DWORD /d 0 /f >NUL 2>&1
  543. :: Disable Client connectivity
  544. @REM Change Logon /Disable >NUL 2>&1
  545. :: Disable Terminal server https://learn.microsoft.com/ru-ru/troubleshoot/azure/virtual-machines/windows/troubleshoot-rdp-general-error
  546. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v "TSEnabled" /t REG_DWORD /d 0 /f >NUL 2>&1
  547.  
  548.  
  549. echo Removing Edge Startup Items
  550. reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "MicrosoftEdgeAutoLaunch_C09E690C3F322367E058F9F0FC90C11A" /f >NUL 2>&1
  551. reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker" /f >NUL 2>&1
  552. schtasks /delete /tn \MicrosoftEdgeUpdateBrowserReplacementTask /F >NUL 2>&1
  553. schtasks /delete /tn \MicrosoftEdgeUpdateTaskMachineCore /F >NUL 2>&1
  554. schtasks /delete /tn \MicrosoftEdgeUpdateTaskMachineUA /F >NUL 2>&1
  555. sc delete edgeupdate >NUL 2>&1
  556. sc delete edgeupdatem >NUL 2>&1
  557. sc delete MicrosoftEdgeElevationService >NUL 2>&1
  558. reg delete "HKLM\System\ControlSet001\Services\edgeupdate" /f >NUL 2>&1
  559. reg delete "HKLM\System\ControlSet001\Services\edgeupdatem" /f >NUL 2>&1
  560. reg delete "HKLM\System\ControlSet001\Services\MicrosoftEdgeElevationService" /f >NUL 2>&1
  561. @REM powershell Remove-AppxPackage Microsoft.Windows.Ai.Copilot.Provider_1.0.3.0_neutral__8wekyb3d8bbwe -AllUsers >NUL 2>&1
  562. @REM dism /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Windows.Ai.Copilot.Provider_1.0.3.0_neutral__8wekyb3d8bbwe /AllUsers >NUL 2>&1
  563.  
  564. :: Edge Telemetry
  565. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "DiagnosticData" /t REG_DWORD /d "0" /f >NUL 2>&1
  566. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "TrackingPrevention" /t REG_DWORD /d "3" /f >NUL 2>&1
  567. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "BingAdsSuppression" /t REG_DWORD /d "1" /f >NUL 2>&1
  568. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "UserFeedbackAllowed" /t REG_DWORD /d "0" /f >NUL 2>&1
  569. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "AddressBarMicrosoftSearchInBingProviderEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  570. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "PersonalizationReportingEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  571. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "PromotionalTabsEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  572. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "SpotlightExperiencesAndRecommendationsEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  573. reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "AllowPrelaunch" /t REG_DWORD /d "0" /f >NUL 2>&1
  574. reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "DoNotTrack" /t REG_DWORD /d "1" /f >NUL 2>&1
  575. reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\TabPreloader" /v "AllowTabPreloading" /t REG_DWORD /d "0" /f >NUL 2>&1
  576.  
  577. reg add "HKCU\Software\Policies\Microsoft\Edge" /v "MetricsReportingEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  578. reg add "HKCU\Software\Policies\Microsoft\Edge" /v "HubsSidebarEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  579. reg add "HKCU\Software\Policies\Microsoft\Edge" /v "PersonalizationReportingEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  580. reg add "HKCU\Software\Policies\Microsoft\Edge" /v "UserFeedbackAllowed" /t REG_DWORD /d "0" /f >NUL 2>&1
  581. reg add "HKCU\Software\Policies\Microsoft\Edge" /v "SpotlightExperiencesAndRecommendationsEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  582. reg add "HKCU\Software\Policies\Microsoft\MicrosoftEdge\BooksLibrary" /v "EnableExtendedBooksTelemetry" /t REG_DWORD /d "0" /f >NUL 2>&1
  583.  
  584. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "WebWidgetAllowed" /t REG_DWORD /d "0" /f >NUL 2>&1
  585. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "HubsSidebarEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  586. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "UserFeedbackAllowed" /t REG_DWORD /d "0" /f >NUL 2>&1
  587. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "MetricsReportingEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  588. reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\BooksLibrary" /v "EnableExtendedBooksTelemetry" /t REG_DWORD /d "0" /f >NUL 2>&1
  589.  
  590. reg add "HKLM\Software\Policies\Microsoft\Edge\Recommended" /v "StartupBoostEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  591. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "StartupBoostEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  592.  
  593. :: From Winaero
  594. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "PinBrowserEssentialsToolbarButton" /t REG_DWORD /d "0" /f >NUL 2>&1
  595. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "EdgeFollowEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  596. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "StandaloneHubsSidebarEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  597. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "SyncDisabled" /t REG_DWORD /d "1" /f >NUL 2>&1
  598. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "HideRestoreDialogEnabled" /t REG_DWORD /d "1" /f >NUL 2>&1
  599. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "ShowRecommendationsEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  600. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "ShowMicrosoftRewards" /t REG_DWORD /d "0" /f >NUL 2>&1
  601. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "QuickSearchShowMiniMenu" /t REG_DWORD /d "0" /f >NUL 2>&1
  602. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "EdgeCollectionsEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  603. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "SearchbarAllowed" /t REG_DWORD /d "0" /f >NUL 2>&1
  604. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "NewTabPageContentEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  605. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "NewTabPageHideDefaultTopSites" /t REG_DWORD /d "1" /f >NUL 2>&1
  606. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "HideFirstRunExperience" /t REG_DWORD /d "1" /f >NUL 2>&1
  607. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "EdgeShoppingAssistantEnabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  608. reg add "HKLM\Software\Policies\Microsoft\Edge" /v "AutoImportAtFirstRun" /t REG_DWORD /d "4" /f >NUL 2>&1
  609.  
  610. :: Remove updates
  611. rmdir /S /Q "C:\Program Files (x86)\Microsoft\EdgeUpdate" >NUL 2>&1
  612.  
  613. echo Disabling Telemetry WINEVT
  614. reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Application-Experience/Steps-Recorder" /v "Enabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  615. reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Application-Experience/Program-Telemetry" /v "Enabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  616. reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Application-Experience/Program-Inventory" /v "Enabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  617. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Application-Experience/Program-Compatibility-Troubleshooter" /v "Enabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  618. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Kernel-EventTracing/Admin" /v "Enabled" /t REG_DWORD /d "0" /f >NUL 2>&1
  619.  
  620. set "WinEvtKeys=Cellcore DefenderApiLogger DefenderAuditLogger Diagtrack-Listener ReFSLog"
  621. for %%K in (Cellcore DefenderApiLogger DefenderAuditLogger Diagtrack-Listener ReFSLog) do (
  622. set "WinEvtPath=HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\WMI\Autologger\%%K"
  623. reg query "!WinEvtPath!" >NUL 2>&1
  624.  
  625. if !errorlevel! equ 0 (
  626. reg add "!WinEvtPath!" /v Start /t REG_DWORD /d 0 /f >NUL 2>&1
  627. )
  628. )
  629.  
  630. echo Disabling Background App Diagnostic Log
  631. powershell Disable-AppBackgroundTaskDiagnosticLog >NUL 2>&1
  632.  
  633. echo Variables to disable telemetry
  634. setx POWERSHELL_TELEMETRY_OPTOUT 1 >NUL 2>&1
  635. setx DOTNET_CLI_TELEMETRY_OPTOUT 1 >NUL 2>&1
  636.  
  637. :: echo Enabling WMIC (24H2)
  638. ::DISM /Online /Add-Capability /CapabilityName:WMIC~~~~ >NUL 2>&1
  639.  
  640. @REM echo Uncompressing OS (24H2)
  641. @REM compact /compactos:never >NUL 2>&1
  642.  
  643. @REM echo 24H2 Stuff
  644. @REM reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot" /v "DisableAIDataAnalysis" /t "REG_DWORD" /d 1 /f >NUL 2>&1
  645.  
  646. echo Disabling Media Player Usage Tracking
  647. reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\MediaPlayer\Preferences" /v "UsageTracking" /t REG_DWORD /d 0 /f >NUL 2>&1
  648.  
  649. echo Search Stuff
  650. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowIndexingEncryptedStoresOrItems" /t "REG_DWORD" /d 0 /f >NUL 2>&1
  651. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AlwaysUseAutoLangDetection" /t "REG_DWORD" /d 0 /f >NUL 2>&1
  652. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "PreventRemoteQueries" /t "REG_DWORD" /d 1 /f >NUL 2>&1
  653.  
  654. @REM echo Track Only Important Events (Auditpol)
  655. @REM Auditpol /set /subcategory:"Process Termination" /success:disable /failure:enable >NUL 2>&1
  656. @REM Auditpol /set /subcategory:"RPC Events" /success:disable /failure:enable >NUL 2>&1
  657. @REM Auditpol /set /subcategory:"Filtering Platform Connection" /success:disable /failure:enable >NUL 2>&1
  658. @REM Auditpol /set /subcategory:"DPAPI Activity" /success:disable /failure:disable >NUL 2>&1
  659. @REM Auditpol /set /subcategory:"IPsec Driver" /success:disable /failure:enable >NUL 2>&1
  660. @REM Auditpol /set /subcategory:"Other System Events" /success:disable /failure:enable >NUL 2>&1
  661. @REM Auditpol /set /subcategory:"Security State Change" /success:disable /failure:enable >NUL 2>&1
  662. @REM Auditpol /set /subcategory:"Security System Extension" /success:disable /failure:enable >NUL 2>&1
  663. @REM Auditpol /set /subcategory:"System Integrity" /success:disable /failure:enable >NUL 2>&1
  664.  
  665. echo Disabling Scheduled Diagnostics
  666. reg add "HKLM\Software\Microsoft\Windows\ScheduledDiagnostics" /v "EnabledExecution" /t REG_DWORD /d "0" /f >NUL 2>&1
  667. reg add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v "AllowNewsAndInterests" /t REG_DWORD /d "0" /f >nul 2>&1
  668. powerrun /SW:0 cmd.exe /k reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v "EnableLog" /t REG_DWORD /d "0" /f >nul 2>&1
  669. powerrun /SW:0 cmd.exe /k reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v "EnableDpxLog" /t REG_DWORD /d "0" /f >nul 2>&1
  670. powerrun /SW:0 cmd.exe /k reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v "EnableLog" /t REG_DWORD /d "0" /f >nul 2>&1
  671. powerrun /SW:0 cmd.exe /k reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v "EnableDpxLog" /t REG_DWORD /d "0" /f >nul 2>&1
  672. powerrun /SW:0 cmd.exe /k reg add "HKLM\SYSTEM\ControlSet001\Control\Diagnostics\Performance" /v "DisableDiagnosticTracing" /t REG_DWORD /d "1" /f >nul 2>&1
  673. powerrun /SW:0 cmd.exe /k reg add "HKLM\System\ControlSet001\Control\Diagnostics\Performance\BootCKCLSettings" /v "Start" /t REG_DWORD /d "0" /f >nul 2>&1
  674. powerrun /SW:0 cmd.exe /k reg add "HKLM\System\ControlSet001\Control\Diagnostics\Performance\SecondaryLogonCKCLSettings" /v "Start" /t REG_DWORD /d "0" /f >nul 2>&1
  675. powerrun /SW:0 cmd.exe /k reg add "HKLM\System\ControlSet001\Control\Diagnostics\Performance\ShutdownCKCLSettings" /v "Start" /t REG_DWORD /d "0" /f >nul 2>&1
  676. powerrun /SW:0 cmd.exe /k reg add "HKLM\SYSTEM\CurrentControlSet\Control\WDI" /v "ScenarioExecutionEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
  677. powerrun /SW:0 cmd.exe /k reg add "HKLM\SYSTEM\CurrentControlSet\Control\WDI\Config" /v "SEMEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
  678.  
  679. echo Setting Powershell Policy Unrestricted
  680. powershell Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine -Force >NUL 2>&1
  681. powershell Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force >NUL 2>&1
  682.  
  683. echo Rebooting...
  684. shutdown /r -t 5 >NUL 2>&1
Add Comment
Please, Sign In to add comment