Prompt user before uninstallation - Advanced Installer Community
mrdcs92
Posts: 7
Joined: Wed Jul 10, 2019 10:43 pm

Prompt user before uninstallation

Hello,

Currently in my installer setup, I am uninstalling a previous version when the user runs the executable and doesn't directly remove the application from programs and features. It will display the 4152 error window, which I do want. But I would like a popup window before this that will give the user the option to uninstall or not, so that they don't accidentally uninstall their previous version. Is there a way I can achieve this?
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Prompt user before uninstallation

Hello,

I am not quite sure I fully understand your scenario. Could you please give me some more details about what you want to achieve (maybe exemplify)?

However, if you simply want to display a message to your user and, based on that, do something, then you can use our predefined custom action for "MessageBox". This custom action will display your message and will save the answer in a property ("Output property" field).

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mrdcs92
Posts: 7
Joined: Wed Jul 10, 2019 10:43 pm

Re: Prompt user before uninstallation

My current scenario is that when a user with an older version attempts to run the executable for a newer version, the popup window created by the Uninstall Cleanup wizard will display (error window 4152). It will tell the user if they would like to remove said files/folders that were chosen in the Uninstall Cleanup Wizard. If they chose yes or no, the uninstall of the actual application will occur regardless.

What I am trying to achieve is that before that window from the Uninstall Cleanup displays, I want to display my own popup window so that the user can choose whether or not they want to uninstall their current application. I have tried creating a custom action to trigger before that window displays, but I have had no luck with finding the right conditions to trigger it beforehand.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Prompt user before uninstallation

Hello,

First of all, please accept my apologies for the delayed reply.
but I have had no luck with finding the right conditions to trigger it beforehand.
In what regards this, you can use a condition as it follows:

Code: Select all

OLDPRODUCTS
OLDPRODUCTS contains a list with the Product Codes of the older versions of your installation package. This property is set only in a package which upgrades another package.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”