tags:

views:

20

answers:

1

Hey Guys, is there any way to disable a feature in the featuretree of Wix, when there are no subfeatures selected? Unfortunatly Wix doesn't do that by default. Thanks in advance - Thomas

A: 

This is because Windows Installer has no such capability. The best you could do is write a custom action that walks your featuretree and disables parents when children and not set to install.

Otherwise, can you possibly rearrange your feature tree / components so that the parent features don't install anything; oly their children do?

Christopher Painter
First is possible, but not the nice way ;)Yes, only children are installing components. But it doesn't look good if no children are selected and the parent node is still active...
Thomas Spranger
Don't forget, people just click next next next anyways... they rarely actually read anything presented to them during an install. :-) Besides, MSI will explain that "this feature will install 0K"Maybe you could name the features so it's clear they are just groups and not real. Or maybe you just don't have the feature, expose the children at the top level.Sorry, this is just the limitations of MSI. Your other choices are to not use the Custom Setup Dialog and associated FeatureTree and create your own UI story that you can better control, possibly even with an external UI handler.
Christopher Painter
I know if it was me there wouldn't be a business justification to do all that so I'd just accept it and move on.
Christopher Painter
Hm, sounds right. Just not the nice way and I hate things like that. But you're right. Not important enough to spend much time for...Thanks for advice!
Thomas Spranger
Other idea: Is there a possibilty to show the parentnodes without the control of the installtype (on hdd, net, cd)? So that they can't get modified?
Thomas Spranger
You could do things like a custom dialog with a group box to express the collection and checkboxes to represent the child features. Then use ControlEvents to add/remove the feature based on the checkboxes.
Christopher Painter