LordKingSquirrel.com



What software do you have installed?

August 13th, 2007 · No Comments

Tagged with:  

Ever need to get a nice list of what software is installed on your computer? I’m working on cataloging all the software we’re using in the department and needed a way to get such a list.

Being a scripting kind of guy, I put together this little VBScript that uses the Windows WMI feature.


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery("Select * from Win32_Product")
Set dateTime = CreateObject("WbemScripting.SWbemDateTime")

Wscript.Echo "Vendor,Product,Version,Date" 

For Each objSoftware in colSoftware
    dateTime.Value = objSoftware.InstallDate2
    Wscript.Echo """" & objSoftware.Vendor & """" & "," _
                           & """" & objSoftware.Name & """" _
                           & "," & objSoftware.Version & "," _
                           & formatDateTime(dateTime.GetVarDate,vbShortDate)
Next

The strComputer="." line specifies what computer you’re checking - the “.” is the current computer. You should be able to specify any computer on the network (or at least your domain).

If you redirect stdout to a file you’ll get a nice CSV file that you can import into Access or Excel.

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment