Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Uninstalling Windows Updates

Posted on 2008-11-13
7
Medium Priority
?
1,114 Views
Last Modified: 2012-05-05
I have recently deployed an WSUS server that is working well except that there is one update that is failing to install.

The update in question is the Group Policy Preference Client Side Extensions for Windows Vista (KB943729). All my computers on WSUS are reporting they do not have this installed and that they require it.

However prior to me setting up the WSUS server I had deployed this patch manually using the "wusa" command on all my computers.

I believe it is this manual install that is interfering with the WSUS install and so I am trying to uninstall this patch.

A manual uninstall works correctly however I have 500 machines to uninstall this patch on and so I am trying to script the uninstall.

I found a script to uninstall updates of the Microsoft website and have attached the script to this question

I have also attached the WindowsUpdate.log that shows the installation of the patch using the wusa command.

The output I am getting from the script is

0
E:\WSUS.vbs(22, 1) (null): 0x80240007

Line 22 is this line: objCollection.Add(colUpdates.Item(0))

I believe that if the patch was being found correctly then the Set colUpdates = objResults.Updates should return 1 rather than 0.

Can you please help me discover what is wrong with this patch.

Mat

Set objCollection = CreateObject("Microsoft.Update.UpdateColl")
 
Set objSearcher = CreateObject("Microsoft.Update.Searcher")
Set objResults = objSearcher.Search("UpdateID='764CCDDC-C9D7-4B6A-9AFA-B38EC97266BE'")
 
 
Set colUpdates = objResults.Updates
Wscript.echo colUpdates.count
 
objCollection.Add(colUpdates.Item(0))
Wscript.echo objCollection.count
 
Set objInstaller = CreateObject("Microsoft.Update.Installer")
objInstaller.Updates = objCollection
 
Set objInstallResults = objInstaller.Uninstall
 
Wscript.Echo objInstallResults.RebootRequired
Wscript.Echo objInstallResults.ResultCode

Open in new window

WindowsUpdate.log
0
Comment
Question by:it-services
  • 4
  • 3
7 Comments
 
LVL 58

Expert Comment

by:McKnife
ID: 22963040
There has been the first update to GPCSE, maybe you installed the old one and this is the new one? The update was releases in the first two weeks of october if I remember correctly.
Anyway, you could
-decline this update at the wsus server if you don't expect new workstations to be added to the domain (no good, eh?)
-install it again through wsus (it is offered again, or not?) - why not?
0
 
LVL 1

Author Comment

by:it-services
ID: 22965465
I've tried installing it through WSUS except the install fails. If I manually uninstall the old manually installed patch then the WSUS update works.
So what I need is a way of scripting the removal of the old update
 
Mat
0
 
LVL 58

Assisted Solution

by:McKnife
McKnife earned 800 total points
ID: 22966959
Look at http://74.125.39.104/search?q=cache:D6ZIBx5Dy_MJ:www.calendarofupdates.com/updates/index.php%3Fshowtopic%3D14917+0x80240007&hl=en&ct=clnk&cd=7 which says that that error code 0x80240007 stands for
A The update to be removed is not installed on the system
or
B The index to a collection was invalid (whatever that means)
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Author Comment

by:it-services
ID: 22969967
I think that B is the error that I am getting.
For some reason the Microsoft.Update.Searcher.Search method isn't returning any results when I specify that specific UpdateID. The UpdateID is the one that I have gotten out of the WindowsUpdate.log
Does anyone know of a script that i can run to output all the installed patches and their corresponding UpdateID's?
 
Mat
0
 
LVL 58

Expert Comment

by:McKnife
ID: 22970381
It assume you will find that collection of IDs at the WSUS when you let it list all installed updates at that system.
0
 
LVL 1

Author Comment

by:it-services
ID: 22972454
I've figured out a way to list all the UpdateID's installed and attached the code below.

I ran this on one of the computers having the problem and I have attached the results.

The Update that I want to remove is listed three times however when I use the specified UpdateID on my original script it still fails.

I'm not too sure where to go from here.



Set objSession = CreateObject("Microsoft.Update.Session")
Set objSearcher = objSession.CreateUpdateSearcher
intHistoryCount = objSearcher.GetTotalHistoryCount
 
Set colHistory = objSearcher.QueryHistory(1, intHistoryCount)
 
For Each objEntry in colHistory
    Wscript.Echo "Title: " & objEntry.Title
    WScript.Echo "UpdateID: " & objEntry.UpdateIdentity.UpdateID
    Wscript.Echo
Next

Open in new window

WSUS.txt
0
 
LVL 1

Accepted Solution

by:
it-services earned 0 total points
ID: 23199656
I wasn't able to get this to work so I've just deployed Vista SP1 using SMS rather than WSUS and this seems to have fixed the problem with this update.

Thanks for your help McKnife. I'm going to try to assign you some points for the assistance.

Mat
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question