Installing file based on features - Advanced Installer Community
McKool
Posts: 113
Joined: Wed Jan 19, 2011 12:35 pm
Location: Darmstadt, Germany
Contact: Website

Installing file based on features

AI Version: 13.1
OS: Windows 10
Platform: 64-Bit

Hello support,

I'm trying to do something I thought it would be trivial, but it is not working. Simplifying my project, let say I have a setup with 5 features, MAIN, FEAT1, FEAT2, FEAT3, FEAT4. Within the feature MAIN is a file, that should be installed only if FEAT3, FEAT4, or both of them are installed. For this I did the following:
  • I have located the file in "Files and Folders"
  • I selected the file and have clicked F8 to go to the component containing the file, within the "Component page"
  • I have created the following condition for the component: ( !FEAT3 = 3 ) OR ( !FEAT4 = 3 )
Using that condition the file is never installed. What could be wrong? What should I do to get the file installed only when any of those features is installed?

Thanks in advance,
Keneth
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Installing file based on features

Hello,

Due to the Windows Installer's design you could not condition the installation of a component by a Feature Action.

As a workaround, you could implement your scenario by creating you own custom feature selection dialog. Please take a look on our article : How to show a custom feature selection dialog

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
McKool
Posts: 113
Joined: Wed Jan 19, 2011 12:35 pm
Location: Darmstadt, Germany
Contact: Website

Re: Installing file based on features

Hello,

thanks for your answer. This workaround is not suitable for us, unfortunately.

Please consider to remove the possibility of create conditions based on components or features within the Organization page, if this is not supported. There are some other place within AI where these options are filtered out, so why not here too? This would save time and effort many people out there.

By the way, the conditions wizard has a problem when trying to create/edit conditions of type "Component" or "Feature". When it is shown, no radio button is selected, and the comboboxs states are not OK. Moreover, all radio buttons can be selected/marked but they cannot be deselected/unmarked. I have tested this with AI v13.1 and also with v14.1.

At first show:
No radio buttons checked, but Combobox active
No radio buttons checked, but Combobox active
ConditionCreate.PNG (10.73 KiB) Viewed 5781 times
After clicking on the radio buttons:
All radio buttons are checked, but Combobox inactive
All radio buttons are checked, but Combobox inactive
ConditionEdit.PNG (10.71 KiB) Viewed 5781 times
Thanks,
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Installing file based on features

Hello,

Please note that there are two different notions regarding features and components : Features State and Features Action / Components State and Components Action.

Feature state refers to the installed state of a feature - for example if a feature is already installed when the installation runs.

Feature action refers to the action state of a feature - for example if a feature will be installed or not.

The wizzard you are referring to sets the condition for component state, not for component action.

The Component Action / Feature Action are disabled for component conditions, as you can see in the attached screenshot:

Best regards,
Sorin
Attachments
screenshot.png
screenshot.png (6.41 KiB) Viewed 5769 times
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
McKool
Posts: 113
Joined: Wed Jan 19, 2011 12:35 pm
Location: Darmstadt, Germany
Contact: Website

Re: Installing file based on features

Hello,
Sorin wrote:The wizzard you are referring ...
Nop, this is not the Wizard I refer. With "wizard" I mean the window that is shown when you click the magic wand icon:
Wizad --> Magic Wand
Wizad --> Magic Wand
Wand.PNG (8.5 KiB) Viewed 5765 times
Sorin wrote:The wizzard you are referring to sets the condition for component state, not for component action
OK, then you will agree that this description is not OK:
Wizard for both, conditions based on a component/feature state or action
Wizard for both, conditions based on a component/feature state or action
StateOrAction.png (4.42 KiB) Viewed 5765 times
Please note that the problem is the (magic wand) wizard. Regardless of whether it is allowed to define a condition based on feature and/or component state and/or action or not, the fact is that the controls state (checked-status value of the radio buttons, and enable state of combo-boxes) is wrong. This is a fact.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Installing file based on features

Hello,

Yes, I understand your statement, but please note that the wizard in cause is used in all circumstances including when conditioning based on component/feature action is possible, so the description is generic (should contain all the possible circumstances).

The posible actions for each particular case are displayed in the combox. As you can see in the first attached screenshot, for your scenario component action is not possible (only the component state options are available in the combobox).

The second screenshot displays the combobox options when component action conditioning is possible.

Best regards,
Sorin
Attachments
screenshot2.jpg
screenshot2.jpg (52.64 KiB) Viewed 5755 times
screenshot3.jpg
screenshot3.jpg (72.38 KiB) Viewed 5755 times
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”