Click to Rate and Give Feedback
MSDN
MSDN Library
 Determining the Current Version of ...
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: 10/23/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Can anyone show vbscript code for this?      BryanLockwood   |   Edit   |   Show History
I'm not finding a way to query for current version of WUA via vbscript.
Tags What's this?: Add a tag
Flag as ContentBug
Vbscript code.      BryanLockwood ... rafevolutioner   |   Edit   |   Show History
  

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

Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker