Uninstall patches order - Advanced Installer Community
sagetuza
Posts: 8
Joined: Mon Dec 12, 2016 2:06 pm

Uninstall patches order

I need to force the user to uninstall patches in reverse order of installation. How do I do that?
I tried Patch Sequence but it doesn't do what I need.
A short hypothetical example:
- install the app with a MSI
- apply the first patch with MSP 1.0
- apply the second patch with MSP 2.0
I need to force the user to uninstall MSP 2.0 before uninstall MSP 1.0.
It is possible?

Thanks a lot
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Uninstall patches order

Hi and welcome to Advanced Installer forums.

To achieve this, you can try to create a search and see if a higher patch version is installed, then add a "Display error message" custom action in your patch, after the "Install Execution Stage -> Paths Resolution" action group that will be executed if a higher version is found when the patch is removed. When a patch is removed the "MSIPATCHREMOVE" property is set, so you can use it as a condition for your custom action.

Let me know if this helped, otherwise give me more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”