VBScript: List MS hotfixes installed

Script below will echo out hotfixes installed on current system.  Change strComputer name to display for remote system.
Usage: cscript.exe script.vbs

==Code start==

strComputer = “.”

Set objWMIService = GetObject(“winmgmts:” _

& “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”)

Set colQuickFixes = objWMIService.ExecQuery _

(“Select * from Win32_QuickFixEngineering”)

For Each objQuickFix in colQuickFixes

‘ Wscript.Echo “Computer: ” & objQuickFix.CSName

Wscript.Echo “Description: ” & objQuickFix.Description

if objQuickFix.HotFixID<>”File 1″ then Wscript.Echo objQuickFix.HotFixID

wscript.Echo “Installation Date: ” & objQuickFix.InstallDate

Wscript.Echo “Installed By: ” & objQuickFix.InstalledBy


==Code End==

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s