This script will display software details that are installed on client that
runs this script.
I am sure you can edit it to mask the required on and act on information.
Regards
Don
Set WshNetwork = CreateObject("WScript.Network")
Set objFSO = CreateObject("Scripting.FileSystemObject")
' GetInstalledSoftware.vbs
' VBScript program to return all applications installed.
'
' ----------------------------------------------------------------------
Set objTextFile = objFSO.CreateTextFile(".\Installed Software.csv", True)
strComputer = WshNetwork.ComputerName
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
("Select * from Win32_Product")
objTextFile.WriteLine "Computer" & "," & "Caption" & "," & _
"Description" & "," & "Identifying Number" & "," & _
"Install Date" & "," & "Install Location" & "," & _
"Install State" & "," & "Name" & "," & _
"Package Cache" & "," & "SKU Number" & "," & "Vendor" & "," _
& "Version"
On Error Resume next
For Each objSoftware in colSoftware
Err.Clear
sInstallDate = Mid(cstr(objSoftware.InstallDate2), 7, 2) _
& "/" & Mid(cstr(objSoftware.InstallDate2), 5, 2) _
& "/" & Left(cstr(objSoftware.InstallDate2), 4)
If Err.Number <> 0 Then
sInstallDate = Mid(cstr(objSoftware.InstallDate), 7, 2) _
& "/" & Mid(cstr(objSoftware.InstallDate), 5, 2) _
& "/" & Left(cstr(objSoftware.InstallDate), 4)
End If
objTextFile.WriteLine strComputer & "," & _
objSoftware.Caption & "," & _
Replace(objSoftware.Description,","," ") & "," & _
objSoftware.IdentifyingNumber & "," & _
cdate(sInstallDate) & "," & _
objSoftware.InstallLocation & "," & _
objSoftware.InstallState & "," & _
objSoftware.Name & "," & _
objSoftware.PackageCache & "," & _
objSoftware.SKUNumber & "," & _
Replace(objSoftware.Vendor,","," ") & "," & _
objSoftware.Version
Next
objTextFile.Close