Contact Info

Crumbtrail » Administration » Scripts » WMI Performance Counters » VBScript

Product - WMI sample in VBScript

The foundations for Manageability in Windows 2019/2012/2008/ and Windows 10/8/7/Vista/XP are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).

ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself.

On this site, you can find many WMI samples.

The Product WMI class can be used in ActiveXperts Network Monitor to monitor your servers.



Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * From Win32_Product")

For Each objItem in colItems
	WScript.Echo "AssignmentType:" & objItem.AssignmentType
	WScript.Echo "Caption:" & objItem.Caption
	WScript.Echo "Description:" & objItem.Description
	WScript.Echo "HelpLink:" & objItem.HelpLink
	WScript.Echo "HelpTelephone:" & objItem.HelpTelephone
	WScript.Echo "IdentifyingNumber:" & objItem.IdentifyingNumber
	WScript.Echo "InstallDate:" & objItem.InstallDate
	WScript.Echo "InstallDate2:" & objItem.InstallDate2
	WScript.Echo "InstallLocation:" & objItem.InstallLocation
	WScript.Echo "InstallSource:" & objItem.InstallSource
	WScript.Echo "InstallState:" & objItem.InstallState
	WScript.Echo "Language:" & objItem.Language
	WScript.Echo "LocalPackage:" & objItem.LocalPackage
	WScript.Echo "Name:" & objItem.Name
	WScript.Echo "PackageCache:" & objItem.PackageCache
	WScript.Echo "PackageCode:" & objItem.PackageCode
	WScript.Echo "PackageName:" & objItem.PackageName
	WScript.Echo "ProductID:" & objItem.ProductID
	WScript.Echo "RegCompany:" & objItem.RegCompany
	WScript.Echo "RegOwner:" & objItem.RegOwner
	WScript.Echo "SKUNumber:" & objItem.SKUNumber
	WScript.Echo "Transforms:" & objItem.Transforms
	WScript.Echo "URLInfoAbout:" & objItem.URLInfoAbout
	WScript.Echo "URLUpdateInfo:" & objItem.URLUpdateInfo
	WScript.Echo "Vendor:" & objItem.Vendor
	WScript.Echo "Version:" & objItem.Version
	WScript.Echo "WordCount:" & objItem.WordCount
	WScript.Echo ""
	WScript.Echo "########"
	WScript.Echo ""