Skip navigation

Q. How can I view a list of the programs that were installed via the Windows Installer?

A. The Add/Remove Programs Control Panel applet lists installed programs, however, the programs aren't necessarily installed via the Windows Installer. The Windows Installer updates an internal programs list, which you can see by running the following code. (Some lines wrap because of space limitations.)

strComputer = "." 
Set objWMIService = GetObject("winmgmts:\{impersonationLevel=impersonate\}!\\" & _
  strComputer & "\root\cimv2") 
Set colSoftware = objWMIService.ExecQuery ("Select * from Win32_Product") 
For Each objSoftware in colSoftware 
    wscript.echo objSoftware.Caption 
Next 

If entries that appear in Add/Remove Programs are missing from this list, the program probably didn't install via the Windows Installer. Execute the code by using cscript from a command line, otherwise, it will pop up hundreds of message boxes because the default execution of a .vbs file via wscript writes each line of output as a separate message box).

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