One cool WMI class in Windows XP is Win32_Product. Try it: Select Start, Run and type Wbemtest, and click OK. Click Connect, enter root\cimv2 for the namespace, and click OK. Then click Query and type Select * From Win32_Product. Give it a sec and you’ll see a list of every Windows Installer-managed application on your machine. Very nifty, and you can write a script that’ll even uninstall applications. Here's a script that will uninstall the application named "Toshiba Registration":



Set oWMI = GetObject("winmgmts:\\.\root\cimv2")
Set cApps = oWMI.ExecQuery("Select * From " & _
"WHERE Name = 'Toshiba Registration'")
For Each oApp in cApps
oApp.Uninstall
Next

Naturally, you can tweak this script to uninstall whatever you want, to display a list of all installed applications (eliminate the WHERE clause and replace oApp.Uninstall with WScript.Echo oApp.Name), and so forth.

http://www.computerperformance.co.uk/Logon/WBMTEST.htm