MSFN Forum: How to hide certain windows 7 updates? - MSFN Forum

Jump to content


Windows 7 forum rules

If you have questions about customizing Windows 7 that are vLite-specific, please post them in the vLite forum, not here. If you have questions regarding the unattended installation of Windows 7, please post them in the Unattended Windows 7/Server 2008 R2 section.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to hide certain windows 7 updates?

#1 User is offline   ndog 

  • Group: Members
  • Posts: 7
  • Joined: 30-September 10
  • OS:none specified
  • Country: Country Flag

Posted 08 May 2011 - 06:46 AM

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


#2 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,675
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 09 May 2011 - 08:25 AM

View Postndog, on 08 May 2011 - 06:46 AM, said:

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.

#3 User is offline   ndog 

  • Group: Members
  • Posts: 7
  • Joined: 30-September 10
  • OS:none specified
  • Country: Country Flag

Posted 20 September 2012 - 04:28 AM

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 :)

#4 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,972
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 20 September 2012 - 09:43 AM

Does your Script also work with foreign language Windows 7 versions?

#5 User is online   bphlpt 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,077
  • Joined: 12-May 07

Posted 20 September 2012 - 10:08 AM

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 topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy