CoolSwarvy
Level 3

Mutually exclusive feature install

Hello Everyone,

I am trying to make an installer with three features - one feature which is compulsory and the other two features which are multually exclusive. I'm not sure how I can impose these conditions on how the features should be installed so that only one or the other is installed depending on the selection (e.g. for a complete install, default to feature A but if a custom install is selected, allow selection of either feature A or feature B but not A & B). I was hoping for some example material or tutorials to help.

To make things a bit more complicated, I wanted to run some custom actions after the installation process. I have already created the custom actions I want to run but which ones are executed depends on which feature (A or B) is installed. How would this be implemented in practice?

Thanks,
CoolSwarvy
Labels (1)
0 Kudos
3 Replies
DLee65
Level 13

What type of installation are you working with? Is this a basic MSI or a pure InstallScript install.

If basic MSI, since you are only dealing with two features that are mutually exclusive, I would create a dialog that contains two radio buttons. Assign a property to the radio button and then set an event that sets the feature level based on the result. Then for each of your features change the default feature level to the appropriate value based on user interaction.

For pure InstallScript I believe there is a command to disable features based on the user's interaction with the radio button control. It has been a long time since I have worked with the UI of pure InstallScript but the help document should point you in the right direction.

As to feature layout, in a scenario like this I usually have three top level features.
--CommonCode
--FeatureA
--FeatureB

Common code contains all components that relate to both A & B and should always be installed.
Feature A and Feature B contain only unique items.

Hopefully this helps.
0 Kudos
CoolSwarvy
Level 3

Thank you for your response DLee65.

I am using a basic MSI project. Following your instructions I have created a dialog box and have the appropriate features installed (please see screenshots), but I'm not sure how to get the triggers/conditions working correctly.

I am fairly sure I am missing something but I am not sure exactly what. If you need more information to determine what I am missing please let me know and I will show you my current configuration.

Thanks,
CoolSwarvy
0 Kudos
DLee65
Level 13

If memory serves me correctly you are very very close.

Remember that the default INSTALLLEVEL is 3 unless you have changed it in the property table.

Set the Install Level for both components to zero, meaning neither will be installed.
Now add a condition to each to set the Install level to a higher value but not higher than the default value.

For instance you can say REPORTPAPERSIZE=1 for the appropriate feature, and REPORTPAPERSIZE=2 for the other feature.

This should get you going.
0 Kudos