cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
TimoZimmermann
Level 5

Merge Module Custom Action only execute when Feature is selected

I have a Merge Module with some files and custom actions. When the msm is added to the main setup Project (Baisc MSI) it must be connected to one or more features.
Only if one of the dependend features will be selected on installation, the files from the merge module will be installed. This functions automatically.

But the conditions from my merge module will be always executed. How must I design the condition so that the custom action of the msm will only be executed when the "parent" ist selected?
Must I check one of the msm components action states or is there an other solution?
Labels (1)
0 Kudos
(2) Replies
DLee65
Level 13

I am confused, you have a Redistributable merge module that is dependent on if a 'dependent' feature is selected?
Why not just make the redistributable a child of the 'dependent feature' rather than the parent feature?
Note that you can associate a redistributable with more than one feature in a basic MSI project.

EDIT: I just read your post again. It sounds as if you have a feature that can stand by itself, let's call it FeatureA.
You have a merge module that you want to run ONLY if FeatureA and FeatureB are both selected. A user can select FeatureB alone as well, so it does not have the Parent > Child relationship with FeatureA.
So basically you require a component condition in the merge module that will execute if FeatureA is Local, and FeatureB is local. Is that correct?
The big question here is if the merge module is your own or from a third party? If it is your own I wonder if can modify the condition to include the feature names in component conditions. I am not sure how custom actions function though as I have never dealt with them in a merge module but perhaps you can add a condition here as well.
If this is the case and modifying the merge module is not an option, create a third hidden feature whose install level is changed to an appropriate value if FeatureA is Local and FeatureB is local. I think that may work for you.
0 Kudos
TimoZimmermann
Level 5

Thanks for your hints. now it works 😉
0 Kudos