cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
enanrum
Level 9

Need a sulution for uninstall issues.

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 ) {
RemoveFiles
RemoveRegKey
}

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.

Thanks,
Tom
Labels (1)
0 Kudos
(1) Reply
enanrum
Level 9

Resolved this by adding a InstallScript Custom action.
0 Kudos