tags:

views:

18

answers:

1

In Wix, how can I construct a feature tree such that when the parent feature is selected via "Will be installed on local drive" some of the child features get selected by default?

I see that only when I select "Entire feature will be installed.." option I see that the sub features are also getting selected, but all of them get selected. I want some granular control over that.

Any pointers?

thanks

A: 

What you are seeing is related to Windows Installer Advertisement. Be sure to read:

Advertisement (Windows)

With this form of advertisement you can install an advertised shortcut or COM registration and the feature and it's components and files won't be installed until you actually try to invoke said entry point. This was a design requirement from 10 years ago when hard drives were expensive and to me is a somewhat useless feature.

Personally I would Feature@AllowAdvertise="no" and Feature@TypicalDefault="install" on each of your features. This should get your Custom Setup looking the way you want it. If it doesn't, I might have misunderstood the question and we need to discuss the INSTALLLEVEL concept.

WiX V3 Feature Element

Christopher Painter
Oh..I wasn't asking about installing a feature only when it is needed..rather something like this...<Feature A> < Feature A1 /> < Feature A2 /></Feature>In the above arrangement, if I select Feature A, I would like Feature A1 to be selected as default while Feature A2 is still optional (unselected by default). I found out that if I set the Level of Feature A1 to 1 (and Feature A to some value other than 1 to make it optional by default), it gets enabled when Feature A gets enabled. Otherwise it doesn't. any better way to enable sub-features at the time of user selection ?thanks