Determining the Current Version of WUA

Determine the version of Windows Update Agent (WUA) before you use it. The current version of WUA is determined by the version of the Wuaueng.dll that is running in the \System32 subdirectory of the current Windows installation. If the version of Wuaueng.dll is version 5.4.3790.1000 or a later version, WUA is installed. A version that is earlier than 5.4.3790.1000 indicates that Software Update Services (SUS) 1.0 is installed.

When a call is made to SUS 1.0 by using the WUA API, an HRESULT of WU_E_AU_LEGACYSERVER is returned.

You can also use the IWindowsUpdateAgentInfo::GetInfo method to retrieve the current file version of Wuapi.dll that is running on a computer. The IWindowsUpdateAgentInfo interface is not supported in WUA 1.0.

For more information, see Updating the Windows Update Agent.

Send comments about this topic to Microsoft

Build date: 11/18/2009

Tags :


Community Content

BryanLockwood
Can anyone show vbscript code for this?
I'm not finding a way to query for current version of WUA via vbscript.
Tags :

rafevolutioner
Vbscript code.
  

OK. Here's what I came up with:

Function WuaVersion 'get current WUA version
Dim oAgentInfo, ProductVersion
On Error Resume Next
Err.Clear
Set oAgentInfo = CreateObject("Microsoft.Update.AgentInfo")
If ErrNum = 0 Then
WuaVersion = oAgentInfo.GetInfo("ProductVersionString")
Else
Wscript.Echo "Error getting WUA version."
WuaVersion = 0 'calling code can interpret 0 as an error.
End If
On Error Goto 0
End Function


Page view tracker