Disable Next button if no feature is selected - Advanced Installer Community
setsune
Posts: 10
Joined: Sat May 25, 2019 4:27 am

Disable Next button if no feature is selected

I have a few questions related to features:

1. How can I go about disabling the Next button if the user has not selected any feature from a Quick Selection List control? Is this possible in Advanced Installer?

2. Is it possible to prevent a user from unchecking a feature in a Quick Selection List control? For example, let's say previously the user installed Feature 1. In running a new version of the installer, I would like to like to force an install of Feature 1 so that they have to update it.

3. I have 1 feature-based prerequisite that I would like to be automatically installed if Feature 1 OR Feature 2 is selected. Is this possible without creating a custom feature dialog?
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Disable Next button if no feature is selected

Hello Setsune,
1. How can I go about disabling the Next button if the user has not selected any feature from a Quick Selection List control? Is this possible in Advanced Installer?
This can be achieved using the "AiCheckedQuickSelectionListProp" property. This property stores the number of the selected features from the quick selection list. Basically, if this property equals "0", then you want to disable the button, otherwise you want to enable it.

Here is how you can achieve that:

- go to "Dialogs" page

- select your dialog

- select the "Next" button and go to "Control Conditions" tab. There, create two control conditions as it follows:

Condition: AiCheckedQuickSelectionListProp = "0"
Action: Disable


Condition: NOT (AiCheckedQuickSelectionListProp = "0")
Action: Enable


This way, the next button should be disabled when the user does not select any feature.
2. Is it possible to prevent a user from unchecking a feature in a Quick Selection List control? For example, let's say previously the user installed Feature 1. In running a new version of the installer, I would like to like to force an install of Feature 1 so that they have to update it.
Yes, this can be achieved by using the "Always install this feature. The 'Entire feature will be unavailable' option will be missing from its context menu in 'CustomizeDlg'" option from "Organization" page --> your feature --> "Installation Settings" section.

However, by doing this, the feature will no longer be presented in the "QuickSelectionList" control. Since you wanted to prevent the user from unchecking it, I guess this is fine.
3. I have 1 feature-based prerequisite that I would like to be automatically installed if Feature 1 OR Feature 2 is selected. Is this possible without creating a custom feature dialog?
I am afraid I am not aware of any method in which this can be achieved. I have ran few tests just now, but unfortunately I was not able to achieve this.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
setsune
Posts: 10
Joined: Sat May 25, 2019 4:27 am

Re: Disable Next button if no feature is selected

Thank you for the help.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Disable Next button if no feature is selected

You are always welcome.

Glad to help.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
contichris
Posts: 6
Joined: Tue Jan 17, 2023 8:31 am

Re: Disable Next button if no feature is selected

Is that method still valid with the property AiCheckedQuickSelectionListProp? For me this doesn't work (using AI 16.6.1). Where can I check if this property is available? I can't find it anywhere.

Regards
Chris
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Disable Next button if no feature is selected

Hello Chris,

Yes, this should work.

I have just checked and the property exists and works fine in v16.6.1.
Screenshot_91.png
Screenshot_91.png (52.94 KiB) Viewed 8660 times

Most likely, you have misconfigured something on your end.

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

Return to “Common Problems”