We currently use the code below to verify that a QFE is installed properly
after it is installed online. We want to do the same thing after installing
QFEs offline. Is there a way to do this programatically, similar to this
method? What we have found is that no offline applied QFEs show up in this
method currently. They do however appear in the Installed updates in the
control panel. They also show up in WMI, but there is no flag for either
operation or resultcode. In order to keep our global community comfortable
that the updates are applied properly we need to log that the installs were
successful programatically.
Set objSession = CreateObject("Microsoft.Update.Session")
Set objSearcher = objSession.CreateUpdateSearcher
intHistoryCount = objSearcher.GetTotalHistoryCount
'Wscript.Echo intHistoryCount
Set colHistory = objSearcher.QueryHistory(1, intHistoryCount)
For Each objEntry in colHistory
Wscript.Echo "Operation: " & objEntry.Operation
Wscript.Echo "Result code: " & objEntry.ResultCode
Wscript.Echo "Date: " & objEntry.Date
Wscript.Echo "Title: " & objEntry.Title
Wscript.Echo "Description: " & objEntry.Description
Wscript.Echo "Client application ID: " & objEntry.ClientApplicationID
Wscript.Echo "Server selection: " & objEntry.ServerSelection
Wscript.Echo "Service ID: " & objEntry.ServiceID
i = 1
For Each strStep in objEntry.UninstallationSteps
Wscript.Echo i & " -- " & strStep
i = i + 1
Next
Wscript.Echo "Uninstallation notes: " & objEntry.UninstallationNotes
Wscript.Echo "Support URL: " & objEntry.SupportURL
Wscript.Echo
Next
--
Thanks,
Scott Patton
|