THIS IS THE BATCH YOU RUN, COPY EVERYTHING BETWEEN BUT NOT INCLUDING THE ##### TO A NEW BATCH FILE NAME OF YOUR CHOOSING, IE. UNINSTALL.UPDATES.BAT this batch file must be run in an Administrator Command Prompt, with all 3 files in the same folder. Thanks to agawthrop and cookieboyeli at overclock.net for all their work in creating this code. ######################################################################################### @echo off cls Title "Uninstall and Hide Windows Updates" Set @kbList=%~dp0\kbList.txt Set @uhwuScript=%~dp0\UninstallWinUpdates.vbs Set @sysNativePath=%windir%\SysNative\ goto verifyPrivileges REM verifies that the CMD window has been opened with proper privileges :verifyPrivileges ECHO Administrative privileges required. Verifying privileges... net session >nul 2>&1 if %errorLevel% == 0 ( ECHO Privileges verified. goto verifyKBList ) else ( ECHO Pivileges not verified. Please close CMD and run with administrator privileges. goto Exit ) REM verifies that the kbList text file exists :verifyKbList ECHO Checking for list of Windows Updates (kbList.txt)... If exist %~dp0\kbList.txt ( set @kbList=%~dp0kbList.txt goto uninstallUpdates ) else ( ECHO The file kbList.txt is required for this program to run and should ECHO contain the list of KBs that are to be uninstalled and hidden. ECHO Each KB should be listed on a separate line. The file should be ECHO saved in the same directory as the .bat file. goto Exit ) REM calls vbscript to uninstall and hide updates listed in kbList.txt :uninstallUpdates ECHO Launching UninstallWinUpdates.vbs... C:\Windows\SysWOW64\Cscript.exe //nologo //D //X %@uhwuScript% %@kbList% %@sysNativePath% ECHO Updates have been uninstalled and hidden. ECHO Please RESTART Windows now. goto Exit :Exit ECHO This program will close in 10 seconds. TIMEOUT /t 10 Exit ################################################################################################# NOW COPY EVERYTHING BETWEEN THE $$$$$$$$$$ TO A NEW FILE CALLED kbList.txt, leave the two top lines of description in the file or it won't work. You may add additional updates to the file as they are released. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ This file is used to store all of the KB article numbers and info. The KB number must be first, and one KB per line. 2902907 - Description is not available 2922324 - UPDATE REMOVED BY MS 2952664 - Get Windows 10 assistant 2976978 - Telemetry for Win8/8.1 2976987 - UPDATE REMOVED BY MS 2977759 - CEIP diagnostics and telemetry Win7 2990214 - Get Windows 10 for Win7 3012973 - UPDATE REMOVED BY MS 3014460 - UPDATE REMOVED BY MS 3015249 - UPDATE REMOVED BY MS 3021917 - Telemetry for Win7 3022345 - Telemetry 3035583 - Get Windows 10 for Win7sp1/8.1 3044374 - Get Windows 10 for Win8.1 3046480 - Telemetry Win7SP1/8.1/Server 2008R2SP1/Server 2012R2 3050265 - Update for "Windows Update" on Win7 3050267 - Get Win10 Win8.1/Server 2012R2 3065987 - Update for "Windows Update" on Win7/Server 2008R2 3065988 - Get Win10 Win8.1/Server 2012R2 3068708 - Telemetry may need manual hide 3075249 - Telemetry for Win7/8.1 3075851 - Update for "Windows Update" on Win7 3075853 - Update for "Windows Update" on Win8.1/Server 2012R2 3080149 - Telemetry for Win7/8.1 3083324 - Get Win10 Win7SP1/Server 2008R2SP1 Sept 2015 3083325 - Get Win10 Win8.1/Server 2012R2 Sept 2015 3083710 - Get Win10 Win7SP1/Server 2008R2SP1 Oct 2015 3083711 - Get Win10 Win8.1/Server 2012R2 Oct 2015 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ NOW COPY EVERYTHING BETWEEN THE ^^^^^^^^^^^ TO A NEW FILE CALLED UninstallWinUpdates.vbs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ On Error Resume Next 'Kills script if ran with no arguments If WScript.Arguments.Count < 1 Then Wscript.Quit End if Dim sysNativePath sysNativePath = WScript.Arguments(1) Dim fso, kbList, kb, kbID, kbArray() 'Pull the KBs from kbList.txt into an Array Set fso = CreateObject("Scripting.FileSystemObject") Set kbList = fso.OpenTextFile(WScript.Arguments(0)) i=0 Do Until kbList.AtEndOfStream 'skips the first 2 lines of kbList.txt due to instructions If i <= 1 Then kbList.ReadLine Else kb = kbList.ReadLine Redim Preserve kbArray(i-2) 'i-2 because we skip the first two lines of text kbArray(i-2) = Left(kb,7) End If i = i+1 Loop kbList.Close Dim numUpdates numUpdates = i-3 'Loop through each KB in list and uninstall if installed Dim iFail iFail = 0 WScript.Echo "Uninstalling" & numUpdates & " Updates..." For Each kbID in kbArray If Not uninstallKb(kbID) Then iFail = iFail + 1 End If Next If iFail > 0 Then Dim numSuccess numSuccess = numUpdates - iFail WScript.Echo numSuccess & " updates have been uninstalled." WScript.Echo iFail & " updates failed to uninstall." Else Wscript.Echo "All updates have been uninstalled." End If 'Hide the updates WScript.Echo "Hiding Updates..." If hideUpdates(kbArray) Then WScript.Echo "Updates have been hidden." Else WScript.Echo "Some updates were hidden." End If 'Funtion to uninstall the KB Function uninstallKb(kbID) Dim objShell, objExec, uFail If getKbID(kbID)= True Then Set objShell = CreateObject("Shell.Application") WScript.StdOut.Write "Uninstalling KB" & kbID & "..." objshell.ShellExecute "Cmd", "/c " & sysNativePath & "\wusa.exe /kb:" & kbID & " /uninstall /quiet /norestart","","runas",0 Do WScript.Sleep 5000 'wait 5 seconds before checking if uninstall is complete Loop Until stillRunning = False If getKbID(kbID) Then Wscript.Echo "Failed" uFail = True Else Wscript.Echo "Completed" End If Else Wscript.Echo "Update KB" & kbID & " is not installed." End If If ufail Then uninstallKb = False Else uninstallKb = True End If End Function 'Function to see if the uninstall command is still processing Function stillRunning Set service = GetObject("winmgmts:") For Each process in service.InstancesOf("Win32_Process") If process.Name = "wusa.exe" Then running = True Exit For End If Next If running Then stillRunning = True Else stillRunning = False End If End Function 'Function to check if the current KB is installed Function getKbID(kbID) Dim strComputer, objService, Items, Item strComputer = "." Set objService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set Items = objService.ExecQuery("Select * from Win32_QuickFixEngineering where HotFixID = 'KB" & kbID & "'") For Each Item in Items If InStr(UCase(Item.HotFixID),UCase("KB" & kbID)) > 0 Then Installed = True End If Next If Installed Then getkbID = True Else getkbID = False End If End Function 'Function searches for uninstalled KBs Function hideUpdates(kbArray) Dim uSession, uSearcher, uResults, uItem, uItemID, i2, i3, found Set uSession = CreateObject("Microsoft.Update.Session") Set uSearcher = uSession.CreateUpdateSearcher() Wscript.StdOut.Write "Searching for pending updates..." Set uResults = uSearcher.Search("IsInstalled=0") Wscript.Echo Cstr(uResults.Updates.Count) & " found." For Each kb in kbArray Found = False Wscript.StdOut.Write "Searching pending updates for KB" & kb & "..." For i2 = 0 To uResults.Updates.Count - 1 Set uItem = uResults.Updates.Item(i2) If InStr(UCase(uItem.Title),UCase("KB" & kb)) <> 0 Then Found = True If uItem.IsHidden = False Then Wscript.StdOut.Write "Hiding update..." uItem.IsHidden = True Wscript.Echo "Hidden" Else Wscript.Echo "Update is already hidden." End If Exit For End If Next If found = False Then WScript.Echo "No Such Update Found" hideUpdates = False Else hideUpdates = True End If Next End Function ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^