Updating Windows Update Agent
Windows Update Agent (WUA) automatically updates itself when it is connected to a Windows Server Update Services (WSUS) server or to Windows Update. WUA can also be manually updated by using a signed installation package that is available from Microsoft. The installation package can be used to install the latest released versions of WUA or of the Muauth.cab file. This section explains how you can programmatically determine that version of Windows Update Agent running on the computer is the latest - or at least current enough - version.
Using the WUA API (specifically the IWindowsUpdateAgentInfo::GetInfo method), you can ask Windows Update Agent for the current version. However, there's no way to determine if that version is the latest version. If you use the WUA API to perform a scan/download/install and receive a WU_E_SELFUPDATE_REQUIRED error message, then that's pretty strong evidence that your version of WUA is out of date. However, there's also no way through the WUA API to force a self-update.
Additionally, if Windows Update on the box is in a broken state, so that automatic self-updates are failing, there's no way to use the WUA API to recover from that. So, as a programmer, the only way you can get out of these situations is either to prompt the user to install KB949104 or to manually install the latest WUA.
This leaves you - the programmer - with two fundamental questions:
- How can my program determine whether or not the running version of WUA is the most recent one (or at least a current one)?
- If my program determines that the running version of WUA is too old, or that WUA isn't running at all, then how can my program force the most recent version of WUA (or at least a current version of WUA) to be installed?
In order to answer these two questions, the following steps should be taken in your application:
Ensuring that an appropriate version of WUA is installed
- Use the WinHTTP API to download http://update.microsoft.com/redist/wuredist.cab.
- Use the security API to verify that the downloaded copy of wuredist.cab has a digital signature from Microsoft. If you cannot verify the digital signature, stop.
- Use the Microsoft Cabinet SDK to extract the XML file from the wuredist.cab file.
- Use the MSXML API to load the XML file and locate the WURedist/StandaloneRedist/architecture node appropriate to the computer's architecture (for example, on an x86 box, locate the WURedist/Standalone/architecture node with the name attribute of "x86").
- Call IWindowsUpdateAgentInfo::GetInfo to determine the current version of the Windows Update Agent. If IWindowsUpdateAgentInfo::GetInfo succeeds, and if it returns a version number that is at least as high as the clientVersion attribute in the architecture node you located, then stop.
- Use the MSXML API to read the downloadUrl attribute from the architecture node you located; this will give you the download URL for the appropriate Windows Update Agent installer for your architecture.
- Use the WinHTTP API to download the appropriate installer.
- Use CreateProcess or a similar API call to execute the downloaded installer.
Send comments about this topic to Microsoft
Build date: 7/7/2011
<architecture name="x86" clientVersion="7.0.6000.381"
<architecture name="x64" clientVersion="7.0.6000.381"
<architecture name="ia64" clientVersion="7.0.6000.381"
When I check the corresponding KB article http://support.microsoft.com/kb/946928 it says the latest version is 7.2.6001.784
Which one is wrong?
- 10/28/2008
- Burning Bridges
- 4/3/2012
- 07588305099
http://download.windowsupdate.com/WindowsUpdate/redist/standalone/7.1.6001.65/WindowsUpdateAgent30-x64.exe
NB WURedist.cab still points to version 7.0.6000.381 at time of writing (17/6/2008)
This is far from all the technical jargon I have seen here.But this might help some people who are having trouble with the windows updater.Im have win7 and up until recently it worked fine.I do not know if because other programs I installed but it faile to work.I recieved a error like it was not working at the time.After trying to figure out what link was the right one for my computer.I finnally went to control panel and clicked on the system and security link and just ran the fix program.It seemed to fix the program for now.
- 8/28/2008
- klammers
- 12/4/2011
- POERNOMO.MAGHFUR
I am wondering if anyone faces this error when you try to do a mbsa scan using mbsacli?
I have downloaded the latest wsusscn2.cab file and windows update agent30x86 (version 7.4.7600:226). It was running fine when I installed windows update agent30x86 (version 7.0.6000:374).
The operating system being used here is Windows server 2003.
Appreciate if anyone could provide me with some solutions to this issue.
Thanks.
- 3/23/2010
- TJ_Security
- 12/4/2011
- POERNOMO.MAGHFUR
I have already downloaded my updates to a network shared path. All I want to do is to install these patches on any of the system over the LAN.
I was not able to create UpdateToInstall collection manually.
Does anyone know how i would go about scripting this.
Thanks in advance
Kalyan
- 4/14/2010
- kalyan93
- 12/4/2011
- POERNOMO.MAGHFUR
Các wuredist.xml bên trong http://update.microsoft.com/redist/wuredist.cab cũng đã quá hạn (báo cáo 7.2.6001.788)
Vì vậy, chúng tôi đang còn lại để hackery để tìm ra những phiên bản mới nhất là ....
WSUS ở đây là phân phối 7.4.7600.226 kể từ cuối vài ngày
- 11/7/2008
- BryanLockwood
- 3/16/2010
- annynguyen007
WUredist.cab was updated on May 1st 2007 to provide links to the WSUS 3.0 WUA client (7.0.6000.374).
WUredist.cab updated, version is now 7.0.6000.381
- 5/2/2007
- Garyhe [msft]
- 9/9/2008
- eliane eliane eva grippa
WSUS 3.0 SP1 is now providing 7.1.6001.65 - when will this be available on as a redistributable installer as described in this article?
- 6/3/2008
- shanedsouza
- 7/23/2008
- Thomas Lee