Q. How can I view a list of the programs that were installed via the Windows Installer?
John Savill
October 16, 2005
1 Min Read
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 & "rootcimv2") 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).
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like