If all features unchecked should warn user - Advanced Installer Community
d79ima
Posts: 24
Joined: Fri Feb 08, 2013 10:28 pm

If all features unchecked should warn user

Hello,

In my installer there are two features which I have unchecked by default, and I would like to force the user to check at least on of them before proceeding with the installation, otherwise pop up a warning message or something like this.

How can I do this?

Thanks,
Dmitry
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: If all features unchecked should warn user

Hello Dmitry,

Unfortunately, you cannot have this scenario due to windows installer limitation.

As a workaround, you can have a custom dialog where you can add a check box for each feature(you should also rename its “Property Name” to something meaningful e.g. FEATURE_1_INSTALL etc).

Then you can use a control condition to enable the [Next] button when at least one check box is selected(by default you don't have any check box selected and the [Next] button is disabled). In order to achieve that, select the [Next] button where your check boxes are and in the “Control Conditions” tab use the [New...] button to add a control condition.

In the “Control condition” window you can have:
Condition field: FEATURE_1_INSTALL OR FEATURE_2_INSTALL where FEATURE_1_INSTALL and FEATURE_2_INSTALL are the property of the check boxes.
Action: set to Enable
You should also add another control condition to disable the [Next] button when no option has been selected. You can have something like that:
Condition field: NOT (FEATURE_1_INSTALL OR FEATURE_2_INSTALL)
Action: set to Disable

Now you can go in the “Organization” page, and select for each feature the “Install based on condition” option from the “Installation Behavior” panel. You can use as a condition the property of the check box assigned to the related feature.

Because the user cannot proceed further if no feature has been selected there is no need to have a warning message.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”