mutually exclusive features
Is it possible to create a Parent Product with several sub features that are mutually exclusive? For example if I have Product A with feature 1 & 2 and you can only have one or the other. So in this case if I select to install feature 1 can it disable feature 2? Further more can I have one set to disabled or rather "will not be installed" by default?
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

mutually exclusive features
Started by
overlordchin
, Feb 15 2011 17:11
2 replies to this topic
Posted 18 May 2011 - 22:54
You could try to create an install condition on your features. The condition would reference the other feature and if true, set the install level to 0 which would exclude it from the installation.
Given 2 features: A and B
Condition on A would be &B != 2 if this is true, set the level to 0
Condition on B would be &A != 2 if this is true, set the level to 0
A feature action (&) that is not 2 means that the feature is not absent. You would need to augment this for feature actions that are advertised (1) since this is also a form of installation. Or you can turn off advertise.
Look here for some help with conditions and feature states vs actions:
http://www.appdeploy...icustomactions/
There are 2 columns when entering install conditions, a level column and the condition.
I do not see a ! in the available operators so I think you will need to use NOT = 2 rather than != 2.
This is the easiest way to do it I think...barring the weird syntax used in the conditions themselves.
Good luck
Given 2 features: A and B
Condition on A would be &B != 2 if this is true, set the level to 0
Condition on B would be &A != 2 if this is true, set the level to 0
A feature action (&) that is not 2 means that the feature is not absent. You would need to augment this for feature actions that are advertised (1) since this is also a form of installation. Or you can turn off advertise.
Look here for some help with conditions and feature states vs actions:
http://www.appdeploy...icustomactions/
There are 2 columns when entering install conditions, a level column and the condition.
I do not see a ! in the available operators so I think you will need to use NOT = 2 rather than != 2.
This is the easiest way to do it I think...barring the weird syntax used in the conditions themselves.
Good luck
Posted 23 May 2011 - 18:24
You can set a feature to not selected by default by setting its InstallLevel value to a value that's higher than the INSTALLLEVEL property. At least that's how to do it in a Basic MSI setup. Not sure if this also works in InstallScript MSI.
In a InstallScript MSI project you could use the SdAskOptions dialog with the EXCLUSIVE flag instead of the usual feature selection dialog.
In a InstallScript MSI project you could use the SdAskOptions dialog with the EXCLUSIVE flag instead of the usual feature selection dialog.
Stefan Krüger
InstallSite.org twitter facebook