PDA

View Full Version : How to conditionally not install a feature if some other feature is selected?



plokolp
10-31-2008, 01:53 AM
Hi,

I hope someone can point me in the right direction here.

My installation has 5 features. I've configured one of these features to be a "common files" feature that contains all of the shared files that features 2-4 will use.

Feature 5 does not require the "common files" in Feature1

How can I configure MSI Factory so that if only Feature5 is selected, Feature 1 is not installed?

I've tried using the conditional level properties to set the install level to 0, but I don't think I've got it right.

Level = 0
Condition = &feature5=3

Totally lost here..

Any help would be greatly appreciated.

Thanks,
Rod

plokolp
05-05-2009, 01:40 AM
Can anyone help here? Many thanks,
Rod

PaulBeaul
07-07-2009, 08:08 PM
Is this posible. I need to do the same thing. Why have we not gotten an answer after such a long time!

Ulrich
07-09-2009, 02:28 PM
Hello,

it might not be possible to change the selection of the features based on the user input, once the CustomizeDlg was displayed. This seems to be a limitation of the way Windows Installer works, as the conditions displaying the features as selected or not are evaluated before the dialog is shown, and after this the user can freely change the selections presented to him. You have no control over it.

If you need to control the installation of one feature based on the selection of another, you may need to use a different route, like building your own UI, using checkboxes and/or radiobuttons.

In the sample attached to this post, I show how to control checkboxes, based on the setting of another checkbox. This is not the only way, and may not even be the best solution, and you could use radiobuttons with similar effect. This should be understood as a proof of concept, and could be used as a starting point. This sample uses four text files as "features". If you select feature 1 to be installed, then feature 3 will not be installed (and the selection is cleared, as well as the checkbox is disabled). The same mutually exclusive selection happens between features 2 and 4. You can select 2 or 4, but not both.

Ulrich

plokolp
07-09-2009, 09:04 PM
Many thanks Ulrich. This is very helpful.
Paul, thanks for the push - I'll be working on implementing something like this, so perhaps we could share ideas. Please feel free to contact me. Best regards,
Rod

PaulBeaul
07-10-2009, 11:41 AM
Rod,
NP... I have finished my install package doing this with Radio buttons and all is working great. I had all kinds of issues near the end and I decided to scrap the project and start fresh with what Ulrich's help on all my posts and in 30 min I had the package working perfectly. I will be releaseing ON TIME!!!! now.

I will send you a privet msg with my contact info. I would like to talk with you anyway about your help desk software.

Paul