This script will take a machine name from a text box and retrieve the windows installer version number for the requested machine.
Vbs Script:
strComputer = InputBox ("Enter Machine Name")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * from CIM_Datafile Where name = 'C:\\Windows\\System32\\Msi.Dll'")
For Each objFile in colFiles
MsgBox UCase(strComputer) & " Windows Installer Version Is : " & objFile.Version
Next
No Comments