KadenAra

How to Uninstall expressions.. ?

Wed Jul 18, 2018 5:07 am

I'm stuck trying to get the uninstall custom action to uninstall only if the feature was selected.

I use (this took about 2 hours to find):
(&Feature=3) AND (!Feature=2) AND NOT Installed

To see if the feature is selected.


I've done many combos to see if the features installed to do the uninstall, ill keep looking but Id figure I would post.

cheers

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: How to Uninstall expressions.. ?

Wed Jul 18, 2018 8:59 am

Hello and welcome to our forums,

In order to achieve what you want, you can create a new Dialog which will contain few checkboxes (one for each of your features) and then condition the install of each feature based on the state of your checkbox. After that, you can further use the state of the checkbox in your Custom Action.

Here is a step-by-step way you can chose to accomplish that:
1) Go to "Dialogs" page from the "User Interface" group and create a new dialog.

2) On this dialog, use the "Control Toolbox" button from the toolbar to add few checkboxes to your dialog. Please keep in mind that we need 1 checkbox for each of our Features.

3) After adding the checkboxes. click on the first one and you'll notice that in the right pane, a "Properties" tab will appear. In the "Property Name" field, change the property name with something more intuitive. Let's say FEATURE_1, which will represent our first feature.

4) Repeat the step number 3) for the rest of the checkboxes.

5) Now let's condition the installation of our features based on the state of the checkboxes. In order to do that, you can go to "Organization" page from the "Package Definition" group, click on your first feature and in "Installation Behavior" tab, tick the "Not installed" option and in "Installed if" field introduce the following:

Code: Select all

FEATURE_1 = "CheckBox"
6) Repeat the step number 5) for the rest of your features.

7) Now you also know if the feature was installed or not, based on the state of the checkbox. If it was ticked, it means that the feature was installed, otherwise it means that it was not installed.

Also, please keep in mind that this solution is viable if your installation is set to run with "Full UI", because the interaction between the user and the setup is done in "Wizard Dialogs Stage".

Hope this helps!

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

Return to “Common Problems”