@echo off :: https://privacy.sexy — v0.8.1 — Wed, 18 Nov 2020 13:12:38 GMT :: ---------------------------------------------------------- :: -----------------Ensure admin privileges------------------ :: ---------------------------------------------------------- echo --- Ensure admin privileges fltmc >nul 2>&1 || ( echo Administrator privileges are required. PowerShell Start -Verb RunAs '%0' 2> nul || ( echo Right-click on the script and select "Run as administrator". pause & exit 1 ) exit 0 ) :: ---------------------------------------------------------- :: ---------------------------------------------------------- :: -Windows Server Update Services Tools capability (revert)- :: ---------------------------------------------------------- echo --- Windows Server Update Services Tools capability (revert) Powershell -Command "$capability = Get-WindowsCapability -Online -Name \"Rsat.WSUS.Tools*\"; Add-WindowsCapability -Name \"$capability.Name\" -Online" :: ---------------------------------------------------------- :: ---------------------------------------------------------- :: ------------Disable automatic updates (revert)------------ :: ---------------------------------------------------------- echo --- Disable automatic updates (revert) reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "NoAutoUpdate" /t "REG_DWORD" /d "1" /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AUOptions" /t "REG_DWORD" /d "3" /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallDay" /t "REG_DWORD" /d "0" /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "ScheduledInstallTime" /t "REG_DWORD" /d "0" /f sc config "UsoSvc" start=auto & sc start "UsoSvc" :: ---------------------------------------------------------- :: Disable device metadata retrieval (breaks auto updates) (revert) echo --- Disable device metadata retrieval (breaks auto updates) (revert) reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata" /v "PreventDeviceMetadataFromNetwork" /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" /v "PreventDeviceMetadataFromNetwork" /t REG_DWORD /d 0 /f :: ---------------------------------------------------------- :: ---------------------------------------------------------- :: ---Do not include drivers with Windows Updates (revert)--- :: ---------------------------------------------------------- echo --- Do not include drivers with Windows Updates (revert) reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v "ExcludeWUDriversInQualityUpdate" /t REG_DWORD /d 0 /f :: ---------------------------------------------------------- :: ---------------------------------------------------------- :: -Prevent Windows Update for device driver search (revert)- :: ---------------------------------------------------------- echo --- Prevent Windows Update for device driver search (revert) reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" /v "SearchOrderConfig" /t REG_DWORD /d 1 /f :: ---------------------------------------------------------- pause exit /b 0