Print View

Windows Update fails with error 0x800703F0 using "Microsoft.Update.Session"

Issue

If a user not logged on, an update script using "Microsoft.Update.Session" will fail when the .Search method is called.

Sample Code:
Set updateSession = CreateObject("Microsoft.Update.Session")
Set updateSearcher = updateSession.CreateupdateSearcher()
WScript.Echo "Searching for updates..." & vbCRLF
Set searchResult = _
updateSearcher.Search("IsInstalled=0 and Type='Software'")


%WINDIR%\WindowsUpdate.log
Misc =========== Logging initialized (build: 7.2.6001.788, tz: +0800) ===========
Misc = Process: C:\Windows\system32\cscript.exe
Misc = Module: C:\Windows\system32\wuapi.dll
COMAPI -------------
COMAPI -- START -- COMAPI: Search [ClientId = <NULL>]
COMAPI ---------
Service WARNING: GetUserTokenFromSessionId failed with error 800703f0 for session 0
COMAPI WARNING: Unable to listen to self-update/shutdown event (hr=0X800703F0)
COMAPI WARNING: Unable to establish connection to the service. (hr=800703F0)
COMAPI - WARNING: Exit code = 0x800703F0
COMAPI ---------
COMAPI -- END -- COMAPI: Search [ClientId = <NULL>]
COMAPI -------------
COMAPI FATAL: Unable to perform synchronous search. (hr=800703F0)
AU ########### AU: Uninitializing Automatic Updates ###########
Service *********
Service ** END ** Service: Service exit [Exit code = 0x240001]
Service *************

Resolution

This is a known issue with the following versions of the Windows Update Agent:

- 7.2.6001.784
- 7.2.6001.788

The workarounds are to run the script as LOCAL SYSTEM, or to downgrade to the 7.1.6001.65 Windows Update Agent:

http://download.windowsupdate.com/WindowsUpdate/redist/standalone/7.1.6001.65/WindowsUpdateAgent30-x64.exe

This is supposed to be resolved in WSUS 3.0 SP2 (currently in Release Candidate):

http://connect.microsoft.com/site/sitehome.aspx?SiteID=110

References

Searching, Downloading, and Installing Updates
http://msdn.microsoft.com/en-us/library/aa387102.aspx

Products

Microsoft Windows Server 2008 x64
Microsoft Windows Server 2008 (any)

Created: 30th June 2009
Updated: 1st July 2009

Print View

© 2005-2024 Jamie Morrison