Prev: How to check each startup process processing time
Next: VbScript and Windows 7 x64 - in IEx64 vbscript works, but notin I
From: Mayayana on 27 May 2010 19:36 | Thanks. I am using Windows XP and i was trying to get the information for | all the Microsoft Products that are installed on my PC and on Network PCs. | | Do we have any VB script which will get the information? The only thing I can suggest is to do what WMI/MSI does: read the Registry. If you look in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData you'll see that the subkeys are user code IDs. Under each of those is a Products key. Under that are a number of keys with random numbers. Each represents something installed with an MSI. If you then look in the InstallProperties key under that you'll find what you need. The Publisher value can be checked to weed out non-MS software. RegCompany and RegOwner values are there. And DisplayName appears to be what shows in Add/Remove. WScript.Shell can read the Registry but it can't enumerate subkeys. If you want a class that can do that see here: http://www.jsware.net/jsware/scripts.php5#wmirclas It's a VBScript class that wraps the WMI StdRegProv. Unlike VBS, StdRegProv can do all basic Registry functions, but the object model is clunky and very poorly designed. The linked class provides a way to bypass the StdRegProv mess and just use sensible functions like GetValue, EnumerateKeys, etc. What you want to do seems pretty straightforward, except for getting the right user ID key. I don't know offhand how one identifies the ID of the current user. |