|
' List Installed Hot Fixes
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
'setting Excel application
Set excel=CreateObject("Excel.Application")
excel.Visible=True
Set workbook1=excel.Workbooks.Add()
Set worksheet=workbook1.Worksheets.Item(1)
Set colQuickFixes = objWMIService.ExecQuery _
("Select * from Win32_QuickFixEngineering")
Dim i
i=1
For Each objQuickFix In colQuickFixes
worksheet.Cells(i,1)= "Computer: " & objQuickFix.CSName
worksheet.Cells(i,2)= "Description: " & objQuickFix.Description
worksheet.Cells(i,3)= "Hot Fix ID: " & objQuickFix.HotFixID
worksheet.Cells(i,4)= "Installation Date: " & objQuickFix.InstallDate
worksheet.Cells(i,5) ="Installed By: " & objQuickFix.InstalledBy
i=i+1
Next
worksheet.UsedRange.EntireColumn.Autofit() |
|