Note:
- some of the commands may return error (task or registry key not found), you can ignore that
# Schedule task:
to make sure the blocking settings are always set, you can create a schedule task to run the script at logon as example
1- copy W10-Block.cmd to C:\Windows directory
2- open command prompt as administrator and execute:
= Remove related Windows 10 upgrade and telemetry updates =
# Advantages:
- safely make sure the upgrade do not sneak in
- get rid of any telemetry effects (tracking, spying)
# Disadvantages:
- needs constant tracking of all future updates to determine which are related or harmful
- Automatic Updates can cause related updates to be installed, specially for new versions of known updates
- skipping latest Windows Update Client which solves the slow/high-resources scans
1) Uninstall updates:
extract W10-Uninstall.cmd of download pack, then right-click and select 'Run as administrator'
or copy the following and save as W10-Uninstall.cmd
v---((゚∀゚))---v
W10-Uninstall.cmd
@echo off
set list=(2952664,2976978,2990214,3021917,3022345,3035583,3044374,3050265,3050267,3064683,3068708,3072318,3075249,3075851,3075853,3080149,3083324,3083325,3083710,3083711,3102810,3102812,3112336,3112343,3121461,3123862,3135445,3135449,3138612,3138615,3150513,3173040)
%windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || goto :eof
setlocal enableextensions
setLocal EnableDelayedExpansion
cd /d "%~dp0"
set name=
echo.
echo Checking installed packages...
Dism /English /Online /Get-Packages>Packs.txt
for /d %%G in %list% do (
for /f "tokens=3 delims=: " %%i in ('findstr %%G Packs.txt') do echo %%i>>ToRemove.txt
)
if not exist ToRemove.txt echo.&echo Non of the specified updates is found installed&goto :end
for /f %%i in (ToRemove.txt) do (call set /a num+=1)
for /f %%i in (ToRemove.txt) do call :setcount %%i
for /L %%j in (1, 1, %num%) do (
set name=!name! /PackageName:!PK%%j!
)
Dism /Online /NoRestart /Remove-Package %name%
del ToRemove.txt
echo.
echo #########################################################
if exist "%windir%\winsxs\pending.xml" echo.&echo System restart is required.
:end
del Packs.txt
echo.
echo.
echo Press any key to Exit
pause >nul
exit
:setcount
set /a count+=1
set PK%count%=%1
goto :eof
Notes:
- the script will need updating when new related updates are released, by appending KB numbers to the list in second line
- for Windows 8.1, if the OS is installed using latest released ISO/ESD (December 2014), it contain a version of KB2976978 that is permanent and can't be removed
the only workaround left is to disable/delete its related tasks:
2) Hide updates:
extract W10-Hide.cmd of download pack, then right-click and select 'Run as administrator'
or copy the following and save as W10-Hide.cmd
%windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || goto :eof
cd /d "%~dp0"
(echo Dim objArgs
echo Set objArgs ^= Wscript.Arguments
echo Dim updateSession, updateSearcher
echo Set updateSession ^= CreateObject^("Microsoft.Update.Session"^)
echo Set updateSearcher ^= updateSession.CreateUpdateSearcher^(^)
echo Wscript.Stdout.Write "Checking for updates..."
echo Dim searchResult
echo Set searchResult ^= updateSearcher.Search^("IsInstalled=0"^)
echo Dim update, kbArticleId, index, index2
echo WScript.Echo " "
echo WScript.Echo " "
echo For index ^= ^0 To searchResult.Updates.Count ^- ^1
echo Set update ^= searchResult.Updates.Item^(index^)
echo For index2 ^= ^0 To update.KBArticleIDs.Count - ^1
echo kbArticleId ^= update.KBArticleIDs^(index2^)
echo For Each hotfixId in objArgs
echo If kbArticleId ^= hotfixId Then
echo If update.IsHidden ^= False Then
echo WScript.Echo "Hiding update: " ^& update.Title
echo update.IsHidden ^= True
echo Else
echo WScript.Echo "Already hidden: " ^& update.Title
echo End If
echo End If
echo Next
echo Next
echo Next
echo.)>Hide.vbs
echo.
cscript.exe //Nologo Hide.vbs %list%
echo.
echo.
echo Press any key to Exit
pause >nul
del Hide.vbs
exit
Notes:
- the script will need updating when new related updates are released, by appending KB numbers to the list in second line
- the hiding operation depend on checking updates using WU api, therefore the process may take some time specially on fresh system with no updates installed
- thanks to MysTikAL3 for original HideUpdates.vbs
3) Extra:
if you suspect or found that there upgrade related files downloaded, you may run these commands in admin cmd to clean them up