cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
knoepdan
Level 6

Feature conditions depending on other features

Hi

In my Basic MSI project (InstallShield 2010) I would like to make a feature depend on other features but i cannot structure the features hierarchically. I have several language features (English, Spanish, French) and one feature called "common". Now if one language feature is selected by the user, the "common" feature needs to be installed as well. (The feature common is hidden in the "select-feature"-Dialog).

Fiddling with feature and component conditions has brougth no success (using conditional statements like: &German = 3 OR !German=3 )

Does anyone have an idea or solution for this?

Greetings




PS: i have seen similar threads for older versions but i havent found a satisfactory solution there.
Labels (1)
0 Kudos
(2) Replies
ericpaul
Level 6

Hello knoepdan,

another location where you might want to influence the features to be installed, is in the dialog itself by adjusting its behavior.
Just select the Next button control and add events such as AddLocal and/or Remove to add or remove certain features based on the condition (like your example: &German = 3 OR !German=3)
The advantage is that you have the logic in one place.

I hope this helps you finding a suitable solution for your problem.
0 Kudos
knoepdan
Level 6

Hi Paul

I havent tried your suggestions as i have a rather simple solution that works for me. I used InstallScript but i guess a VB or C++ is also possible:

Select a feature (make it installed):
MsiSetFeatureState(hMSI, "featureName", INSTALLSTATE_LOCAL);

Deselect a feature (dont installe)
MsiSetFeatureState(hMSI, "featureName", INSTALLSTATE_ABSENT);


I guess i should have come up with that myself but i am still a newbie
0 Kudos