Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



Sign in to follow this  
ndog

How to hide certain windows 7 updates?

Recommended Posts

I am trying to 'hide' certain updates in Windows 7 which are

important (1) - Update for Windows 7 (KB971033)

Optional (34) - Arabic Language Pack - Windows 7 Service Pack 1 (KB2483139)

...

Ukrainian Language Pack - Windows 7 Service Pack 1 (KB2483139)

I am doing this on about 20 laptops (different models, requires sysprep) this week for a education provider, and I would like to do via automation, eg script

As far as I am aware the windows updates database is stored here - c:\windows\softwaredistribution\Datastore\DataStore.edb

Editing this file will not be easy via script, unless someone knows how to do via powershell, vbs etc...

If I use WSUS server, can it auto hide these updates for me?

Regards

Share this post


Link to post
Share on other sites

If I use WSUS server, can it auto hide these updates for me?

If you use WSUS, as long as you do not make that update available to your users, it won't show up for them.

Share this post


Link to post
Share on other sites

Hi everyone.

Heres how to hide updates via script. Please make sure you are connected to internet first and can see microsoft.com.

hideKBs.vbs


Dim hideupdates(7)
hideupdates(0) = "Microsoft Security Essentials - KB2267621"
hideupdates(1) = "Microsoft Security Essentials - KB2691894"
hideupdates(2) = "Bing Desktop"
hideupdates(3) = "Windows Internet Explorer 9 for Windows 7"
hideupdates(4) = "Windows Internet Explorer 9 for Windows 7 for x64-based Systems"
hideupdates(5) = "KB971033"
hideupdates(6) = "Update for Windows 7 for x64-based Systems (KB971033)"
hideupdates(7) = "KB2483139"

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

Have a good day :)

Share this post


Link to post
Share on other sites

This looks like it has real potential! It's a shame it has to be connected to the internet rather than offline, but it's better than having to do it completely manually. Now if there was only an easy way to get the full names of the all the updates you desire to hide, especially the 34 "xxxxx Language Pack - Windows 7 Service Pack 1 (KB2483139)" updates, into your script. Thanks for getting us this far!

Cheers and Regards

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×