If you need to query details of the windows registry to find an installed MSI this little method will enable you to work out the Hive that the product details are installed under, assuming you know the Product Code of the MSI. This just saves enumerating through all of the registry keys.
Look in the following registry hive:
HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-x-x-xx\Products
You should now see a load of GUID's which are all modified Product Codes, here is how you work out the GUID.
The returned String will be the same as the Keys in the registry.
I don't know if this is useful to anyone or not and I haven't needed this code for a long time, but a previous organization needed the registry GUID in thier documentation so I put together this simple method so that I could find the details without searching the registry.
No comments:
Post a Comment