jstuardo
Posts: 87
Joined: Mon Nov 09, 2015 10:44 pm

Feature based prerequisite does not work.

Thu Oct 05, 2017 10:01 pm

Hello,

I need a prerequisite to be installed only and only if a feature is selected by the user at installation time.

I have done these steps:
  • Added feature-based prerequisite and leave all default properties.
  • Went to organization window and selected new feature that was created
  • Selected "Disabled" in Installation Behaviour since i don't want this feature to be listed for the user
  • Added an Install-time condition, "installed if", with this condition !F4500 = 3. F4500 is the feature that will cause this prerequisite to be installed or not.
  • Selected child node of the new feature and added the same condition
  • After all this effort, prerequisite is not installed, selecting or not the F4500 feature
Any help, please?

Thanks
Jaime

Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Feature based prerequisite does not work.

Fri Oct 06, 2017 7:04 am

Hello,

Please note that Windows Installer does not permit conditioning the installation of a feature based on the state of another feature.

A possible workaround is to create a custom feature selection dialog on which some controls (for example checkboxes) will give the user the option to select which features will be installed. Here is an article that describes how to create such a dialog : http://www.advancedinstaller.com/user-g ... ature.html

Then you could condition the prerequisite's feature by a checkbox from the above dialog. Just go to "Organization" page, select the feature associated with your prerequisite and choose "Not Installed" "Installed only if" : "CHECKBOX".

This will ensure your prerequisite will only be installed if the user wants to install a certain feature (selects the checkbox).

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

berqo127
Posts: 21
Joined: Tue Aug 06, 2019 1:35 pm

Re: Feature based prerequisite does not work.

Thu Jan 23, 2020 3:35 pm

Hi,

Is there a better solution today? I prefer to stick to the feature selection dialog. I think it looks better then a custom dialog with checkboxes.

Thanks,
Shlomi

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

Re: Feature based prerequisite does not work.

Thu Jan 23, 2020 4:21 pm

Hello Shlomli,

As my colleague Sorin mentioned, this is a Windows Installer limitation and unfortunately I am not aware of any other workaround.

Please let me know if there is anything else I could help you with.

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

Return to “Building Installers”