Reputation: 2208
I have system that install via internet several MSI products and I have a situation - tester delete folder with product, but not the registry keys and my system see that the product exists via registry and it tries to upgrade it, but product actually didn't exists.
Is there any MSI function which help me determinate the state of product in silent mode and if user delete files - uninstall the whole product?
Upvotes: 4
Views: 6633
Reputation: 986
if you just need to check whether the product is still registered with Windows Installer - convert your package's product code to packed guid format (e.g. by using script from http://www.dwarfsoft.com/blog/2010/06/22/msi-package-code-fun/) and search for its presence in HKCR\Installer\Products.
To actually remove the product from Windows Installer database - the simplest way is to use MsiZap from http://msdn.microsoft.com/en-us/library/windows/desktop/aa370523(v=vs.85).aspx.
Upvotes: 1