View Full Version : Need a sulution for uninstall issues.

10-12-2011, 03:04 PM
Basic MSI Installer: I made a huge mistake in releasing the next version of our product where I had not changed any of the component codes for the new release. We treat each release as its own product - since you can have both versions on the same machine. I did change the Product Code and Update Codes.

Installing is no issue. The issue is when uninstalling if you have both version installed. The install will remove all the files but leaves all the Folders and a registry key if you had the previous version installed.

I'm working on the ServicePack now and would like to know the best way to check the registry for the Uninstall key:
[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\uninstall\{uid of installed product}]
and if this DOES NOT EXIST - remove any folders, files and registry key left behind from that product.

if ( ! regKeyExists ) {

Also - would this Custom Action work in a Patch? So if the user patches previous release - it will completely remove all files and folders if they have the new release installed.

Hope this makes sense.


10-14-2011, 08:05 AM
Resolved this by adding a InstallScript Custom action.