SORAW441

RemoveW10Bloat2021.bat (Update 30-06-2021!)

May 30th, 2021 (edited)
1,131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 10.20 KB | None | 0 0
  1. @rem *** Disable Some Service ***
  2. REM *** Script taken from https://www.hwinfo.com/misc/RemoveW10Bloat.htm and modified to allow the cortana removal and the rem'd toggles, however MS Store app itself will be preserved for safekeeping. Not my work! Modified 2021 ***
  3. sc stop DiagTrack
  4. sc stop diagnosticshub.standardcollector.service
  5. sc stop dmwappushservice
  6. sc stop WMPNetworkSvc
  7. sc stop WSearch
  8.  
  9. sc config DiagTrack start= disabled
  10. sc config diagnosticshub.standardcollector.service start= disabled
  11. sc config dmwappushservice start= disabled
  12. sc config RemoteRegistry start= disabled
  13. sc config TrkWks start= disabled
  14. sc config WMPNetworkSvc start= disabled
  15. sc config WSearch start= disabled
  16. sc config SysMain start= disabled
  17.  
  18. REM *** SCHEDULED TASKS tweaks ***
  19. schtasks /Change /TN "Microsoft\Windows\AppID\SmartScreenSpecific" /Disable
  20. schtasks /Change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /Disable
  21. schtasks /Change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /Disable
  22. schtasks /Change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /Disable
  23. schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /Disable
  24. schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /Disable
  25. schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /Disable
  26. schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Uploader" /Disable
  27. schtasks /Change /TN "Microsoft\Windows\Shell\FamilySafetyUpload" /Disable
  28. schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn" /Disable
  29. schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack" /Disable
  30. schtasks /Change /TN "Microsoft\Office\Office 15 Subscription Heartbeat" /Disable
  31.  
  32. schtasks /Change /TN "Microsoft\Windows\Autochk\Proxy" /Disable
  33. schtasks /Change /TN "Microsoft\Windows\CloudExperienceHost\CreateObjectTask" /Disable
  34. schtasks /Change /TN "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" /Disable
  35. schtasks /Change /TN "Microsoft\Windows\DiskFootprint\Diagnostics" /Disable *** Not sure if should be disabled, maybe related to S.M.A.R.T.
  36. schtasks /Change /TN "Microsoft\Windows\FileHistory\File History (maintenance mode)" /Disable
  37. schtasks /Change /TN "Microsoft\Windows\Maintenance\WinSAT" /Disable
  38. schtasks /Change /TN "Microsoft\Windows\NetTrace\GatherNetworkInfo" /Disable
  39. schtasks /Change /TN "Microsoft\Windows\PI\Sqm-Tasks" /Disable
  40. REM The stubborn task Microsoft\Windows\SettingSync\BackgroundUploadTask can be Disabled using a simple bit change. I use a REG file for that (attached to this post).
  41. schtasks /Change /TN "Microsoft\Windows\Time Synchronization\ForceSynchronizeTime" /Disable
  42. schtasks /Change /TN "Microsoft\Windows\Time Synchronization\SynchronizeTime" /Disable
  43. schtasks /Change /TN "Microsoft\Windows\Windows Error Reporting\QueueReporting" /Disable
  44. schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\Automatic App Update" /Disable
  45.  
  46. REM *** Remove Cortana ***
  47. REM Currently MS doesn't allow to uninstall Cortana using the above step claiming it's a required OS component (hah!)
  48. REM We will have to rename the Cortana App folder (add ".bak" to its name), but this can be done only if Cortana is not running.
  49. REM The issue is that when Cortana process (SearchUI) is killed, it respawns very quickly
  50. REM So the following code needs to be quick (and it is) so we can manage to rename the folder
  51. REM
  52. REM Disabling Cortana this way on Version 1703 (RS2) will render all items in the Start Menu unavailable.
  53. REM So this is commented out for now until a better solution is found.
  54. taskkill /F /IM SearchUI.exe
  55. move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.bak"
  56.  
  57. @rem *** Remove Telemetry & Data Collection ***
  58. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata" /v PreventDeviceMetadataFromNetwork /t REG_DWORD /d 1 /f
  59. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
  60. reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v DontOfferThroughWUAU /t REG_DWORD /d 1 /f
  61. reg add "HKLM\SOFTWARE\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d 0 /f
  62. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "AITEnable" /t REG_DWORD /d 0 /f
  63. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisableUAR" /t REG_DWORD /d 1 /f
  64. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
  65. reg add "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" /v "Start" /t REG_DWORD /d 0 /f
  66. reg add "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger" /v "Start" /t REG_DWORD /d 0 /f
  67.  
  68. @REM Settings -> Privacy -> General -> Let apps use my advertising ID...
  69. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
  70. REM - SmartScreen Filter for Store Apps: Disable
  71. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost" /v EnableWebContentEvaluation /t REG_DWORD /d 0 /f
  72. REM - Let websites provide locally...
  73. reg add "HKCU\Control Panel\International\User Profile" /v HttpAcceptLanguageOptOut /t REG_DWORD /d 1 /f
  74.  
  75. @REM WiFi Sense: HotSpot Sharing: Disable
  76. reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" /v value /t REG_DWORD /d 0 /f
  77. @REM WiFi Sense: Shared HotSpot Auto-Connect: Disable
  78. reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" /v value /t REG_DWORD /d 0 /f
  79.  
  80. @REM Change Windows Updates to "Notify to schedule restart"
  81. reg add "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v UxOption /t REG_DWORD /d 1 /f
  82. @REM Disable P2P Update downlods outside of local network
  83. reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v DODownloadMode /t REG_DWORD /d 0 /f
  84.  
  85. @REM *** Disable Cortana & Telemetry ***
  86. reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "AllowCortana" /t REG_DWORD /d 0
  87.  
  88. REM *** Hide the search box from taskbar. You can still search by pressing the Win key and start typing what you're looking for ***
  89. REM 0 = hide completely, 1 = show only icon, 2 = show long search box
  90. reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f
  91.  
  92. REM *** Disable MRU lists (jump lists) of XAML apps in Start Menu ***
  93. reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /t REG_DWORD /d 0 /f
  94.  
  95. REM *** Set Windows Explorer to start on This PC instead of Quick Access ***
  96. REM 1 = This PC, 2 = Quick access
  97. REM reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /t REG_DWORD /d 1 /f
  98.  
  99. REM *** Disable Suggestions in the Start Menu ***
  100. reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f
  101.  
  102. @rem Remove Apps
  103. PowerShell -Command "Get-AppxPackage *3DBuilder* | Remove-AppxPackage"
  104. PowerShell -Command "Get-AppxPackage *Cortana* | Remove-AppxPackage"
  105. PowerShell -Command "Get-AppxPackage *Getstarted* | Remove-AppxPackage"
  106. PowerShell -Command "Get-AppxPackage *WindowsAlarms* | Remove-AppxPackage"
  107. REM PowerShell -Command "Get-AppxPackage *WindowsCamera* | Remove-AppxPackage"
  108. PowerShell -Command "Get-AppxPackage *bing* | Remove-AppxPackage"
  109. PowerShell -Command "Get-AppxPackage *MicrosoftOfficeHub* | Remove-AppxPackage"
  110. PowerShell -Command "Get-AppxPackage *OneNote* | Remove-AppxPackage"
  111. PowerShell -Command "Get-AppxPackage *people* | Remove-AppxPackage"
  112. PowerShell -Command "Get-AppxPackage *WindowsPhone* | Remove-AppxPackage"
  113. PowerShell -Command "Get-AppxPackage *photos* | Remove-AppxPackage"
  114. PowerShell -Command "Get-AppxPackage *SkypeApp* | Remove-AppxPackage"
  115. PowerShell -Command "Get-AppxPackage *solit* | Remove-AppxPackage"
  116. PowerShell -Command "Get-AppxPackage *WindowsSoundRecorder* | Remove-AppxPackage"
  117. REM PowerShell -Command "Get-AppxPackage *xbox* | Remove-AppxPackage"
  118. PowerShell -Command "Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage"
  119. PowerShell -Command "Get-AppxPackage *zune* | Remove-AppxPackage"
  120. REM PowerShell -Command "Get-AppxPackage *WindowsCalculator* | Remove-AppxPackage"
  121. PowerShell -Command "Get-AppxPackage *WindowsMaps* | Remove-AppxPackage"
  122. PowerShell -Command "Get-AppxPackage *Sway* | Remove-AppxPackage"
  123. PowerShell -Command "Get-AppxPackage *CommsPhone* | Remove-AppxPackage"
  124. REM PowerShell -Command "Get-AppxPackage *ConnectivityStore* | Remove-AppxPackage"
  125. PowerShell -Command "Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage"
  126. REM PowerShell -Command "Get-AppxPackage *ContentDeliveryManager* | Remove-AppxPackage"
  127. REM PowerShell -Command "Get-AppxPackage *Microsoft.WindowsStore* | Remove-AppxPackage"
  128.  
  129.  
  130. @rem NOW JUST SOME TWEAKS
  131. REM *** Show hidden files in Explorer ***
  132. reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d 1 /f
  133.  
  134. REM *** Show super hidden system files in Explorer ***
  135. reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSuperHidden" /t REG_DWORD /d 1 /f
  136.  
  137. REM *** Show file extensions in Explorer ***
  138. reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t  REG_DWORD /d 0 /f
  139.  
  140.  
  141.  
  142. REM *** Uninstall OneDrive ***
  143. start /wait "" "%SYSTEMROOT%\SYSWOW64\ONEDRIVESETUP.EXE" /UNINSTALL
  144. rd C:\OneDriveTemp /Q /S >NUL 2>&1
  145. rd "%USERPROFILE%\OneDrive" /Q /S >NUL 2>&1
  146. rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S >NUL 2>&1
  147. rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S >NUL 2>&1
  148. reg add "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f /v Attributes /t REG_DWORD /d 0 >NUL 2>&1
  149. reg add "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f /v Attributes /t REG_DWORD /d 0 >NUL 2>&1
  150. echo OneDrive has been removed. Windows Explorer needs to be restarted.
  151. pause
  152. start /wait TASKKILL /F /IM explorer.exe
  153. start explorer.exe
  154.  
Add Comment
Please, Sign In to add comment