views:

12

answers:

0

Hello! I want to get list of installed updates on Vista Business using WSH

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colQuickFixes = objWMIService.ExecQuery("Select * from Win32_QuickFixEngineering")
Set objDateTime = CreateObject("WbemScripting.SWbemDateTime")

For Each objQuickFix in colQuickFixes
    Wscript.Echo "Computer: " & objQuickFix.CSName
    Wscript.Echo "Description: " & objQuickFix.Description
    Wscript.Echo "Hot Fix ID: " & objQuickFix.HotFixID  
    objDateTime.Value = objQuickFix.InstalledOn
    Wscript.Echo "Installation Date: " & objDateTime.GetFileTime
    Wscript.Echo "Installed By: " & objQuickFix.InstalledBy
Next

I have error

Syntax Error
Error code: 80041021
Source: SWbemDateTime
Line: 10

I found in MSDN following text:

The format of strFileTime is not valid.

Maybe I have to convert objQuickFix.InstalledOn to other data type? Thanks