Minnu123
Posts: 4
Joined: Wed Feb 13, 2019 10:20 am

Uninstall from control panel based on customer choice

I am requesting someone to give a solution for the below scenario

Our application:
scenario 1 : Upgrade by another version
In the application customer used to keep some user data during application run. So during upgrade these files are maintained[used the property Dont overwrite files in Upgrading product code] to not remove so that user data wont remove

scenario 2 : Control panel uninstall
when uninstall invokes from control panel, all application files are getting removed.. this includes user data too..

Scenario 1 & 2 is the expected scenario and its working fine
But in this scenario, there is a risk that customer can accidentally uninstall from control panel. In that case all user data too removed

Inorder to overcome this, we need to display a warning message to customer that uninstall will remove all data. Then an option should display from where customer can choose the uninstall type he wants
1. uninstall should remove the product completely[regular uninstall]
2. Uninstall should keep the files with the property Dont overwrite files in Upgrading product code.


Could some one please advice me to address this.

Thanks in advance
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Uninstall from control panel based on customer choice

Hello,

In order to achieve what you want, you can proceed as it follows:
  • go to "Custom Actions" page and create a "MessageBox" custom action that has two buttons (Yes and No)
  • schedule it under "Install Execution Stage" --> between "Searches" and "Paths Resolution" action groups
  • under "Execution Stage Condition", uncheck "Install" and "Maintenance"
MsgBox.png
MsgBox.png (92.05 KiB) Viewed 1634 times


  • now condition the files you do not want to be removed as it follows:

Code: Select all

REMOVE = "ALL" AND BTN_PRESSED = "IDNO"
This way, during an uninstall (REMOVE = "ALL"), if the user will press the "No" in the messagebox, the file will not be removed.

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

Return to “Common Problems”