SORAW441

[Batch, W10] RemoveW10Bloat.bat (NO STORE)

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