Does anyone know, how given a GUID that identifies an installed product, you can find the patches installed for that product with C#?
The application is quite complex and from time to time, we create patches (MSP files) through Orca/MSI. These patches can then be installed on the customer's computer and can then be viewed in "View Installed Updates" under Programs and Features.
I've tried two approaches:
Using WMI I can find my product in Win32_Product and retrieve the information there. However, if I then query either Win32_PatchPackage or Win32_Patch for matches against the "ProductCode". I would have expected the captions/description to contain the information I want, but all I get is another separate set of GUIDs for each which doesn't seem very obvious what to do with it.
Similarly, using the Registry I can find the Product (under HKLM\Software\Microsoft\Uninstall\\, and with some digging I can find Patches (under HKLM\Software\Microsoft\Installer\UserData\S-1-5-18\Products\) but the key isn't obvious. It isn't the same as my products installer GUID.
This question discusses similar issues, but the questioner was looking for the Windows patches, while I need my own applicaitons patches - so there solution doesn't really work for me.
Thanks in advance.