JSI Tip 9220. How can I generate a .TSV file containing the software installed on my computer?


I have scripted Installed.vbs to generate a Tab Separated Value file to report the installed software on your computer.

The syntax for using Installed.vbs is:

cscript //nologo Installed.vbs Filename.tsv

Where Filename.tsv will contain Name, GUID, Install Date, Install Location, Install State, Package Cache, Vendor, and Version for each install.

Installed.vbs contains:

Set objArguments = Wscript.Arguments
wFile=objArguments(0)
Set fso = CreateObject("Scripting.FileSystemObject")
Set TFile = fso.CreateTextFile(wFile, True)
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "\{impersonationLevel=impersonate\}!\\" & strComputer & "\root\cimv2")
Set hdr = objWMIService.ExecQuery _
    ("Select * from Win32_Product")

TFile.WriteLine  "Name" & vbtab & "GUID" & vbtab & _
    "Install Date" & vbtab & "Install Location" & vbtab & _
    "Install State" & vbtab & _ 
    "Package Cache" & vbtab &  "Vendor" & vbtab _
        & "Version" 

For Each pkg in hdr
    TFile.WriteLine pkg.Name & vbtab & _
    pkg.IdentifyingNumber & vbtab & _
    pkg.InstallDate2 & vbtab & _
    pkg.InstallLocation & vbtab & _
    pkg.InstallState & vbtab & _
    pkg.PackageCache & vbtab & _
    pkg.Vendor & vbtab & _
    pkg.Version
Next
TFile.Close



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish