Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- ECHO.
- ECHO. This batch must be run as Admin
- ECHO.
- ECHO. Privacy and/or bandwidth conscious tweaks for
- ECHO. Windows 10 (also OK to run on Win 7, 8, 8.1)
- ECHO.
- PAUSE
- IF NOT EXIST "C:\Windows\System32\GWX" goto skipgwx
- ECHO.
- ECHO. **************************************************************************************
- ECHO. Prevent auto upgrade to Win10
- ECHO. **************************************************************************************
- ECHO.
- TAKEOWN /f "C:\Windows\System32\Tasks\Microsoft\Windows\SettingSync" /a /r /d Y
- ECHO y| CACLS "C:\Windows\System32\Tasks\Microsoft\Windows\SettingSync" /T /C /G BUILTIN\Administrators:F "NT AUTHORITY\LOCAL SERVICE":F "NT AUTHORITY\SYSTEM":F
- TAKEOWN /f "C:\Windows\System32\Tasks\Microsoft\Windows\Setup\GWXTriggers" /a /r /d Y
- ECHO y| CACLS "C:\Windows\System32\Tasks\Microsoft\Windows\Setup\GWXTriggers" /T /C /G BUILTIN\Administrators:F "NT AUTHORITY\LOCAL SERVICE":F "NT AUTHORITY\SYSTEM":F
- TAKEOWN /f "C:\Windows\System32\Tasks\Microsoft\Windows\Shell" /a /r /d Y
- ECHO y| CACLS "C:\Windows\System32\Tasks\Microsoft\Windows\Shell" /T /C /G BUILTIN\Administrators:F "NT AUTHORITY\LOCAL SERVICE":F "NT AUTHORITY\SYSTEM":F
- RENAME "C:\Windows\System32\GWX" GWX-disabled
- PAUSE
- :skipgwx
- ECHO.
- ECHO. **************************************************************************************
- ECHO. Stop and remove services not required
- ECHO. **************************************************************************************
- ECHO.
- REM for some HP machines
- sc config HPAuto start= disabled
- sc config hpqwmiex start= disabled
- sc config "HP Health Check Service" start= disabled
- sc config "HP Support Assistant Service" start= disabled
- REM for Intel management/spyware that is not needed
- sc config "Intel(R) Capability Licensing Service Interface" start= disabled
- sc config cphs start= disabled
- sc config jhi_service start= disabled
- sc config LMS start= disabled
- sc config UNS start= disabled
- REM for Windows 10 below...
- sc config WinDefend start= disabled
- REM sc config seclogon start= disabled
- sc config RetailDemo start= disabled
- sc stop DiagTrack
- sc stop diagnosticshub.standardcollector.service
- sc stop dmwappushservice
- sc stop WMPNetworkSvc
- sc stop WSearch
- sc config DiagTrack start= disabled
- sc config diagnosticshub.standardcollector.service start= disabled
- sc config dmwappushservice start= disabled
- sc config WMPNetworkSvc start= disabled
- sc config WSearch start= disabled
- echo "" > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl
- PAUSE
- ECHO.
- ECHO. **************************************************************************************
- ECHO. Remove Scheduled tasks problems
- ECHO. **************************************************************************************
- ECHO.
- schtasks /Change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /Disable
- schtasks /Change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /Disable
- schtasks /Change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /Disable
- schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /Disable
- schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /Disable
- schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /Disable
- schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Uploader" /Disable
- schtasks /Change /TN "Microsoft\Windows\Shell\FamilySafetyUpload" /Disable
- schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn" /Disable
- schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack" /Disable
- schtasks /Change /TN "Microsoft\Office\Office 15 Subscription Heartbeat" /Disable
- schtasks /Change /TN "Microsoft\Windows\CloudExperienceHost\CreateObjectTask" /Disable
- schtasks /Change /TN "Microsoft\Windows\DiskFootprint\Diagnostics" /Disable *** Not sure if should be disabled, maybe related to S.M.A.R.T.
- schtasks /Change /TN "Microsoft\Windows\FileHistory\File History (maintenance mode)" /Disable
- schtasks /Change /TN "Microsoft\Windows\PI\Sqm-Tasks" /Disable
- schtasks /Change /TN "Microsoft\Windows\Windows Error Reporting\QueueReporting" /Disable
- schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\Automatic App Update" /Disable
- PAUSE
- ECHO.
- ECHO. **************************************************************************************
- ECHO. Reg Edits for problems
- ECHO. **************************************************************************************
- ECHO.
- ECHO. WiFi Sense, HotSpot Sharing, Disable
- reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" /v value /t REG_DWORD /d 0 /f
- ECHO. WiFi Sense, Shared HotSpot Auto-Connect, Disable
- reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" /v value /t REG_DWORD /d 0 /f
- ECHO. Disable your machine from sending updates to other machines
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v DownloadMode /t REG_DWORD /d 0 /f
- ECHO. Change Windows Update to Notify to schedule restart
- reg add "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v UxOption /t REG_DWORD /d 1 /f
- ECHO. Hide the search box from taskbar
- REM 0 = hide completely, 1 = show only icon, 2 = show long search box
- reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f
- ECHO. Disable MRU lists (jump lists) of XAML apps in Start Menu
- reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /t REG_DWORD /d 0 /f
- ECHO. Set Windows Explorer to start on This PC instead of Quick Access
- REM 1 = This PC, 2 = Quick access
- reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /t REG_DWORD /d 1 /f
- ECHO. Show hidden files in Explorer
- reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d 1 /f
- ECHO. Show super hidden system files in Explorer
- reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSuperHidden" /t REG_DWORD /d 1 /f
- ECHO. Show file extensions in Explorer
- reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f
- ECHO. Remove other Telemetry & Data Collection...
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata" /v PreventDeviceMetadataFromNetwork /t REG_DWORD /d 1 /f
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
- reg add "HKLM\SOFTWARE\Policies\Microsoft\MRT" /v DontOfferThroughWUAU /t REG_DWORD /d 1 /f
- reg add "HKLM\SOFTWARE\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d 0 /f
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "AITEnable" /t REG_DWORD /d 0 /f
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" /v "DisableUAR" /t REG_DWORD /d 1 /f
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" /v "Start" /t REG_DWORD /d 0 /f
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger" /v "Start" /t REG_DWORD /d 0 /f
- PAUSE
- ECHO.
- ECHO. **************************************************************************************
- ECHO. Disable and uninstall OneDrive
- ECHO. **************************************************************************************
- ECHO.
- REM BEGIN uninstall OneDrive
- set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe"
- set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe"
- echo Closing OneDrive process.
- echo.
- taskkill /f /im OneDrive.exe > NUL 2>&1
- ping 127.0.0.1 -n 5 > NUL 2>&1
- echo Uninstalling OneDrive.
- echo.
- if exist %x64% (
- %x64% /uninstall
- ) else (
- %x86% /uninstall
- )
- ping 127.0.0.1 -n 5 > NUL 2>&1
- echo Removing OneDrive leftovers.
- echo.
- rd "%USERPROFILE%\OneDrive" /Q /S > NUL 2>&1
- rd "C:\OneDriveTemp" /Q /S > NUL 2>&1
- rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1
- rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1
- ECHO. Remove OneDrive from the Explorer Side Panel
- REG DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
- REG DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
- PAUSE
- ECHO.
- ECHO. **************************************************************************************
- ECHO. Uninstall Win10 apps
- ECHO. **************************************************************************************
- ECHO.
- PowerShell -Command "Get-AppxPackage *3DBuilder* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *Getstarted* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *WindowsAlarms* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *WindowsCamera* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *bing* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *MicrosoftOfficeHub* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *OneNote* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *people* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *WindowsPhone* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *photos* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *SkypeApp* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *solit* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *WindowsSoundRecorder* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *zune* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *WindowsCalculator* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *WindowsMaps* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *Sway* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *CommsPhone* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *ConnectivityStore* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *Facebook* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *Twitter* | Remove-AppxPackage"
- PowerShell -Command "Get-AppxPackage *Drawboard PDF* | Remove-AppxPackage"
- PAUSE
- ECHO.
- ECHO. **************************************************************************************
- ECHO. Uninstall Win7/8/10 Telemetry stuff
- ECHO. **************************************************************************************
- ECHO.
- wusa /uninstall /KB:2952664 /norestart /quiet
- wusa /uninstall /KB:2990214 /norestart /quiet
- wusa /uninstall /KB:3021917 /norestart /quiet
- wusa /uninstall /KB:3022345 /norestart /quiet
- wusa /uninstall /KB:3035583 /norestart /quiet
- wusa /uninstall /KB:3044374 /norestart /quiet
- wusa /uninstall /KB:3068708 /norestart /quiet
- wusa /uninstall /KB:3075249 /norestart /quiet
- wusa /uninstall /KB:3080149 /norestart /quiet
- wusa /uninstall /KB:2977759 /norestart /quiet
- PAUSE
- :notice
- ECHO.
- ECHO. **************************************************************************************
- ECHO. All done...
- ECHO. A restart is required for all changes to take effect!
- ECHO. **************************************************************************************
- ECHO.
- PAUSE
- :done
- EXIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement