Last active
October 19, 2015 11:28
-
-
Save hryamzik/b6e242765dc65eb75262 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
Dim hideupdates(7) | |
hideupdates(0) = "KB3035583 " | |
set updateSession = createObject("Microsoft.Update.Session") | |
set updateSearcher = updateSession.CreateupdateSearcher() | |
Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software'") | |
For i = 0 To searchResult.Updates.Count-1 | |
set update = searchResult.Updates.Item(i) | |
For j = LBound(hideupdates) To UBound(hideupdates) | |
'MsgBox hideupdates(j) | |
if instr(1, update.Title, hideupdates(j), vbTextCompare) = 0 then | |
'Wscript.echo "No match found for " & hideupdates(j) | |
else | |
Wscript.echo "Hiding " & hideupdates(j) | |
update.IsHidden = True | |
end if | |
Next | |
Next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment