I mentioned earlier that only the items displayed in bold type need to be changed to make this script work. Let's see what they are.
First, strComputerName can be defaulted to ".". This points to your local machine. That was easy! The next one, WMI_ProcessName, will take a little more checking. Checking wbemtest, we find something called Win32_PnPSignedDriver which looks like a likely candidate. To discover the ItemPropertyName values, the wbemtest utility tells us that we can get the properties Description, DeviceName, Manufacturer, and DriverVersion. The screenshot shows the last property, DriverVersion, displayed in wbemtest.
The script now looks like this (with a few extra statements to complete it).
Use this command in a DOS Command Window to run your script:
cscript scriptname.vbs where scriptname is replaced by the name you used.
~~~~~~~~~~~~~~~~~~~~~~~~~
strComputer = "."
Set objWMIService = _
GetObject( _
"winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = _
objWMIService.ExecQuery( _
"Select * from Win32_PnPSignedDriver")
For Each objItem in colItems
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "DeviceName: " & objItem.DeviceName
Wscript.Echo "Manufacturer: " & objItem.Manufacturer
Wscript.Echo "DriverVersion: " & objItem.DriverVersion
Wscript.Echo " "
Next
~~~~~~~~~~~~~~~~~~~~~~~~~


