Created
December 15, 2015 18:19
-
-
Save john-clark/04f7a47138ba5be5b9d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' cmd /c start /wait wscript HideKBs.vbs | |
' | |
' Original Mike.Moore Dec 17, 2012 on answers.microsoft but when ran it Hide everything so no good. | |
' Link to script: http://www.msfn.org/board/topic/163162-hide-bing-desktop-and-other-windows-updates/ | |
Dim WSHShell, StartTime, ElapsedTime, strUpdateName, strAllHidden | |
Dim Checkagain 'Find more keep going otherwise Quit | |
Dim hideupdates(37) | |
hideupdates(0) = "KB3035583" 'Windows 10 app | |
hideupdates(1) = "Bing Bar" 'Bing Bar ALL | |
hideupdates(2) = "Bing Desktop" 'With this we get all versions | |
hideupdates(3) = "KB2673774" 'Bing Bar 7.3 KB | |
hideupdates(4) = "KB2709981" 'Windows Media Player 12 | |
hideupdates(5) = "KB2803821" 'Windows Media Player 12 | |
hideupdates(6) = "KB2876229" Skype | |
hideupdates(7) = "Internet Explorer 8" | |
hideupdates(8) = "Internet Explorer 9" | |
hideupdates(9) = "Internet Explorer 10" | |
hideupdates(10) = "KB3022345" 'false sfc result - replaced by Telemetry patch | |
hideupdates(11) = "KB2861855" 'Remote Desktop Protocol 8.0 | |
hideupdates(13) = "KB2574819" 'Remote Desktop DTLS. | |
hideupdates(14) = "KB2592687" 'Remote Desktop Protocol 8.0 | |
hideupdates(15) = "KB2647753" 'RDP pringing logging | |
hideupdates(16) = "KB2660075" 'Samoa TZ wtf? | |
hideupdates(17) = "KB2709630" 'Roaming pofile??????????????????????????????? | |
hideupdates(18) = "KB2719857" 'USB RNDIS 3g 4g? | |
hideupdates(19) = "KB2726535" 'South Sudan - new kernel? | |
hideupdates(20) = "KB2732059" 'oxps | |
hideupdates(21) = "KB2761217" 'calibri light fonts? | |
hideupdates(22) = "KB2773072" 'changes gaming ratings | |
hideupdates(23) = "KB2786081" ' ie10 save creds | |
hideupdates(24) = "KB2786400" 'arabic text | |
hideupdates(25) = "KB2813956" 'mobile broadban van ui | |
hideupdates(26) = "KB2830477" 'Remote Desktop | |
hideupdates(27) = "KB2846960" 'windows sharepoint ie10 | |
hideupdates(28) = "KB2853952" 'write cache hyperv | |
hideupdates(29) = "KB2882822" 'itrace relogger | |
hideupdates(30) = "KB2893519" 'SspiPromptForCredentials | |
hideupdates(31) = "KB3068708" 'Telemetry | |
hideupdates(32) = "KB3075249" 'Telemetry | |
hideupdates(33) = "KB3080149" 'Telemetry | |
hideupdates(34) = "KB3068708" 'Telemetry | |
hideupdates(35) = "KB3022345" 'Telemetry | |
hideupdates(36) = "KB2902907" 'MS Security Essentials/Windows Defender related update | |
hideupdates(37) = "KB971033" 'WGA | |
Set WSHShell = CreateObject("WScript.Shell") | |
StartTime = Timer 'Start the Timer | |
Set updateSession = CreateObject("Microsoft.Update.Session") | |
updateSession.ClientApplicationID = "MSDN Sample Script" | |
Set updateSearcher = updateSession.CreateUpdateSearcher() | |
Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0") | |
Checkagain = "True" | |
For K = 0 To 10 'Bing Desktop has 4, Silverlight has 5 | |
If Checkagain = "True" Then | |
Checkagain = "False" | |
CheckUpdates | |
ParseUpdates | |
End if | |
Next | |
ElapsedTime = Timer - StartTime | |
strTitle = "Bing Desktop and Windows Updates Hidden." | |
strText = strAllHidden | |
strText = strText & vbCrLf & "" | |
strText = strText & vbCrLf & "Total Time " & ElapsedTime | |
intType = vbOkOnly | |
'Silent just comment these 2 lines with a ' and it will run and quit | |
Set objWshShell = WScript.CreateObject("WScript.Shell") | |
intResult = objWshShell.Popup(strText, ,strTitle, intType) | |
'Open Windows Update after remove the comment ' | |
'WshShell.Run "%windir%\system32\control.exe /name Microsoft.WindowsUpdate" | |
Set objWshShell = nothing | |
Set WSHShell = Nothing | |
WScript.Quit | |
Function ParseUpdates 'cycle through updates | |
For I = 0 To searchResult.Updates.Count-1 | |
Set update = searchResult.Updates.Item(I) | |
strUpdateName = update.Title | |
'WScript.Echo I + 1 & "> " & update.Title | |
For j = 0 To UBound(hideupdates) | |
if instr(1, strUpdateName, hideupdates(j), vbTextCompare) = 0 then | |
Else | |
strAllHidden = strAllHidden _ | |
& vbcrlf & update.Title | |
update.IsHidden = True' | |
Checkagain = "True" | |
end if | |
Next | |
Next | |
End Function | |
Function CheckUpdates 'check for new updates cause Bing Desktop has 3 | |
Set updateSession = CreateObject("Microsoft.Update.Session") | |
updateSession.ClientApplicationID = "MSDN Sample Script" | |
Set updateSearcher = updateSession.CreateUpdateSearcher() | |
Set searchResult = _ | |
updateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0") | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment