Something like this?

<?define F2s-Condition=...?>

...

<Feature Id="F1" ...>
  <Condition>...</Condition>
</Feature>

<Feature Id="F2" ...>
  <Condition>$(var.F2s-Condition)</Condition>
</Feature>

<Component Id="Comp1" Feature="F1" .../>
<Component Id="Comp2" Feature="F1" Transitive="yes">
  <Condition>$(var.F2s-Condition)</Condition>
</Component>

This has a limitation in that you can't select F2 for installation via
ADDLOCAL or via the UI's feature selection treeview or similar mechanisms.
Instead you have to set properties and only condition F2 based on those
properties for this solution to work, since feature and component
conditioning/selection are performed during CostFinalize atomically to you,
and you don’t have access to the feature installation properties until after
CostFinalize returns.

-----Original Message-----
From: Dmitry Berkovich [mailto:dber...@gmail.com] 
Sent: Monday, August 31, 2009 1:55 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Component condition not works properly

Hi Bob,
  I think you did not understand my question.
I will try explain it again:
  I have 2 features and 2 components. Where Comp1 belong to feaute F1
and Comp2 belong to F2.
My system can be installed in 3 variants:
  1)  only F1 selected - I am expecting that only Comp1 will be installed
  2) F1 & F2 selected - I am expecting that Comp1 & Comp2 will be installed
  3) only F2 selected - I am expecting that Comp1 will not installed
(since it belong to F1) but Comp2 will not installed too(since F1 not
selected), even that F2 selected.

Its mean I want install Comp2 only if both F1 & F2 selected.

 Thanks,
  Dima

On Sun, Aug 30, 2009 at 8:09 PM, Bob Arnson<b...@joyofsetup.com> wrote:
> Dmitry Berkovich wrote:
>> As you can see from example I want install Comp2 only if F1 selected,
>> even if F2 selected (Comp2 belong to F2).
>>
>
> It needs to belong in both features. MSI won't install it if its parent
> feature isn't being installed.
>
> --
> sig://boB
> http://joyofsetup.com/
>
>
>
>
----------------------------------------------------------------------------
--
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
> trial. Simplify your report design, integration and deployment - and focus
on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>

----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus
on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to