> Date: Fri, 16 May 2008 09:22:57 -0700
> From: "Tanikella, Rajanikanth (SCR US)"
> <[EMAIL PROTECTED]>
> Subject: [WiX-users] Exclusive Installation of Features
>
> In the 'yep - back to being 100% frustrated' thread, someone mentioned
> it is impossible to install two features exclusively from one another.
> Is this true?
> I would like to create an installer that is capable of installing my
> certs, and/or my rich client, and/or my web application, and/or my full
> server. But judging from the use of feature level, it seems impossible
> to arbitrarily choose one of these and not install any of the others.
> Is this correct? Is there no workaround using conditions on my
> features? My initial experiment suggests not.
Yes, it can be done.
I only have two features ("Hub" and "Edge") that are exclusive so my example is
a bit
simplistic compared to something with more exclusive features, but you'll get
the idea.
I created a custom error dialog, "MG_FeatureError", that says;
"One, and only one, of the sub-features may be selected."
Then in the UI section of the project I have this;
<UI>
[snip]
<!-- If multiple NewDialog and SpawnDialog control events are selected for
the same control, -->
<!-- only the event with the largest value in the Ordering column gets
published -->
<!-- when the control is activated. -->
<!-- http://msdn2.microsoft.com/en-us/library/aa368037(VS.85).aspx -->
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog"
Value="MG_FeatureError"
Order="3"><![CDATA[&Hub=3 AND &Edge=3]]></Publish>
[snip]
Your conditions will likely get large/messy, but it can be done.
( &FeatA=3 AND (&FeatB=3 OR &FeatC=3 OR &FeatD=3) ) OR ( etc... )
This does not enforce the restriction on installs with no UI, but hopefully
the people invoking from the command line read the documentation...
Dale
Dale Quigg ||| Senior Build / Configuration / Installation Engineer
MessageGate ||| Enterprise Email Governance
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users