Posts: 5
Joined: Tue May 29, 2018 8:34 am

Prerequisite based on feature

Thu Jun 18, 2020 4:08 pm

I've searched for the solution to this on the help and the forums, but I can't find how to do it...

I have a prerequisite that must only be installed if some feature is selected by the user. How can I do it in Advanced Installer?

Thank in advance

Posts: 4527
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite based on feature

Mon Jun 22, 2020 12:41 pm

Hello Patrick,

In order to achieve this, we can bind both the feature and the prerequisite to one dialog control.

Basically, we will install the feature based on a UI control selection (i.e. a checkbox control) and we will use the same control to decide the installation of our prerequisite.

Please note that in order to make this work, the prerequisite should be added as a "feature-based"/"post-install" prerequisite.

Please go to "Dialogs" page and add a checkbox control on one of your dialogs (e.g. "WelcomeDlg") (to do so, you can use the "Control Toolbox" button from the toolbar)

CheckBox.png (349.82KiB)Viewed 763 times

As you can see, this control has a property assigned to it. Additionally, this property has a default value.

(both of the above can be changed)

You can now go in "Organization" page. Here, please select your feature and under "Installation Behavior", set the feature default behavior to:

Not installed --> Installed if:

CHECKBOX_1_PROP = "CheckBox"

This way, the feature will only be installed if the checkbox was checked.

Now please select the feature of your prerequisite and repeat the above steps for the prerequisite as well.

Now, the prerequisite should only be installed if the user has the checkbox checked.

The logic is as it follows:

- the checkbox is checked --> the feature is installed --> the prerequisite is installed

Hope this helps.

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

Return to “Common Problems”