Sehremis
Posts: 12
Joined: Mon Nov 20, 2017 3:28 pm

Uninstalling Patches

Mon Nov 20, 2017 3:35 pm

Hello everyone,

I am just experimenting with patches. I've successfully created a project where the V1.0.0 installer installs two .txt files, and the V1.0.0 -> V1.0.1 patch changes one of the text files, leaves the second as it is, and adds a third one.

However, after applying the patch, I can't uninstall the program using either the V1.0.0 installer or the V1.0.1 installer. Both give me the error message "Another version of this product is already installed. Installation of this version cannot continue etc. " and I have to manually uninstall it from the Control Panel.

How can I fix this? I remember most professional products having an uninstaller that successfully uninstalls the project no matter which patch is applied. I'd like to include something like this in my project as well.

Thanks in advance,
Kira Resari

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Uninstalling Patches

Tue Nov 21, 2017 1:23 pm

Hi Kira and welcome to Advanced Installer forums,

I have replicated your case, but only encountered the error when trying to run the V1.0.1 installer.
The error message is showed if you created a package, installed it, modified its contents and then you tried to install it again without uninstalling the original one. Basically, Windows Installer can upgrade the original package only if the modified one has a higher version and a different Product Code. Note that your users will never encounter the case since they will never be in direct touch with the 1.0.1 MSI file. The only files they may use are the V1.0.0 installer and the patch.

As for the uninstall function you can go to the Files and Folders Page --> "New Shortcut To" on the ribbon and from the drop down menu choose "Uninstall". The Uninstall shortcut is actually a shortcut to the external msiexec.exe file in the Windows System folder, giving the current Product Code as argument.

Please let me know if there is anything else I can help you with.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Sehremis
Posts: 12
Joined: Mon Nov 20, 2017 3:28 pm

Re: Uninstalling Patches

Thu Nov 23, 2017 8:29 am

Hi Dan,

thanks for the information. It's good to know how these things work. I've tried what you suggested, and it worked perfectly. The uninstaller is also nice touch, although for some reason, unlike the regular uninstallation routine, the uninstaller does not remove the folder the project was installed in if it is empty after the uninstallation, but I suppose that's an issue with the msiexec.exe file that we can't do anything about.

Thanks a lot!
Kira Resari

Return to “Building Installers”