Prevent Microsoft Upgrading Windows 7 to 10

Microsoft has been pushing people to upgrade to Windows 10 very adamantly. This is partly achieved through Windows Updates. They have published important and recommended updates which leads to annoying nag programs and the automatic download of Windows 10 installation files (which is over 2GB).

Disable OS Upgrades

Microsoft has published an official way to prevent OS Upgrades in the form of a registry patch. Simply Add the following to the registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
"DisableOSUpgrade"=dword:00000001

Uninstall and Hide Windows Upgrade Related Updates

Run the following batch of commands to remove all upgrade related updates. After uninstalling, you should hide these updates from showing up by right clicking on the update and selecting "Hide".

The updates can be identified by the KB number.

rem These updates are not advertised by Windows Updates unless OS upgrades are enabled
wusa /kb:2990214 /uninstall /quiet /norestart
wusa /kb:3022345 /uninstall /quiet /norestart
wusa /kb:3075249 /uninstall /quiet /norestart
wusa /kb:3112343 /uninstall /quiet /norestart

rem Thses updates are always advertised
wusa /kb:2952664 /uninstall /quiet /norestart
wusa /kb:3021917 /uninstall /quiet /norestart
wusa /kb:3035583 /uninstall /quiet /norestart
wusa /kb:3068708 /uninstall /quiet /norestart
wusa /kb:3080149 /uninstall /quiet /norestart
wusa /kb:3123862 /uninstall /quiet /norestart
wusa /kb:3173040 /uninstall /quiet /norestart
pause

Newest KB: 30th Jun 2016 - KB3173040
Latest Revised Update: 19th July 2016 - 3035583

Disable Telemetry Scheduled Tasks

Windows has scheduled tasks which collect and send telemetry data to microsoft. You can disable telemetry by running the following batch of commands.

schtasks /Change /TN "\Microsoft\Windows\Application Experience\AitAgent" /DISABLE
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\Autochk\Proxy" /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\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" /DISABLE
schtasks /Change /TN "\Microsoft\Windows\Maintenance\WinSAT" /DISABLE