Hi Michael, That was something I was playing with. However your solution just nailed it! One comment for the history - one should use public property like PATHADD instead of PathAdd to make sure property is transferred between user and service mode. Thanks a lot! Martin
> From: mosm...@baytech.com.au > To: wix-users@lists.sourceforge.net > Date: Tue, 10 May 2011 08:04:59 +1000 > Subject: Re: [WiX-users] dependent features > > Hi Martin > > You could build up a single property with the PATH entry you wish to add > using a series of Type 51 Custom Actions. Each would add the path option for > a feature and be conditioned by the feature state. You then have a single > component (linked to you Register Environment Variables feature) which > actually applies the values. > > Pseudo code would be something like > > <CustomAction Id="Feature1.AddToPath" Property="PathAdd" > Value="[PathAdd];Feature1Path" /> > <CustomAction Id="Feature2.AddToPath" Property="PathAdd" > Value="[PathAdd];Feature2Path" /> > > <InstallExecuteSequence> > <Custom Action="Feature1.AddToPath" After="CostFinalize">&Feature1 = > 3</CustomAction> > <Custom Action="Feature2.AddToPath" After=" Feature1.AddToPath">&Feature2 = > 3</CustomAction> > </InstallExecuteSequence> > > <Component Id=" Register Environment Variables Component"> > Add [PathAdd] to registry > </Component> > > > Regards > > Michael > > > -----Original Message----- > From: Martin Kulov [mailto:mar...@kulov.net] > Sent: Tuesday, 10 May 2011 7:41 AM > To: wix-users > Subject: [WiX-users] dependent features > > Hi all, > > > > I would like to set environment variable PATH based on other features that > user has selected to install. PATH should set only the paths for selected > features. Additionally user must turn on and off PATH registration by > choosing to install feature called "Register Environment Variables". > > > > Based on the article below I found that it is not possible to have a > component condition based on feature state: > > http://www.joyofsetup.com/2008/04/09/feature-states-in-component-conditions/ > > > > I spent my day looking for a solution, so any ideas would be extremely > helpful. > > > > Thanks, > > > > Martin Kulov > > http://www.kulov.net > > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users