Hi Again. (please use reply to all - to keep WiX-user in)
Read this carefully: Here is sample code: <Component Id="component0" Guid="..."> <Condition><![CDATA[ComponentCondition = "Yes"]]></Condition> ... </Component> <Component Id="component2" Guid="..."> <Condition><![CDATA[ComponentCondition = "No"]]></Condition> ... </Component> <Feature Id="F_FeatureA" Level="1"> <Condition Level="0" > <![CDATA[FeatureCondition = Yes"]]></Condition> <ComponentRef Id='component0' /> <ComponentRef Id='component1' /> </Feature> And here is meaning: If 'FeatureCondition' property is set to Yes THEN the entire feature 'F_FeatureA' will not be installed (it means that both components will not be installed no matter on the 'ComponentCondition' setting). If 'FeatureCondition' property is set to Yes THEN the feature 'F_FeatureA' will be installed. The install state of components is now dependent on the 'ComponentCondition' property. - if the 'ComponentCondition' property is set to 'Yes' then component 'component0' will be installed and 'component1' will not be installed - if the 'ComponentCondition' property is set to 'No' then component 'component1' will be installed and 'component0' will not be installed The element Condition belongs to element Feature or Component. The Condition cannot affect the ComponentRef element. Hope that now you will understand it. Regards Stefan Venkatesh wrote: > Still I am not able to get it going. I have code like this > > <Feature Id='MainProgram' Title=' TEAMS Program' Description='The main > executable.'Level='1'> > <Condition Level="1" ><![CDATA[Unicode = "Yes"]]></Condition> > <ComponentRef Id='component0' /> > <ComponentRef Id='component1' /> > <Condition Level="0" ><![CDATA[Unicode = "No"]]></Condition> > <ComponentRef Id='component2' /> > > </Feature> > > When the condition is Yes, it should install Component0 and Component1 > is n't it?. Still installs Component2 also. Same thing with the No, It > installs all three components. What am I doing wrong here. Thanks in > advance. > > Venkatesh > > > */Stefan Pavlik <[EMAIL PROTECTED]>/* wrote: > > Hi Venkatesh, > > The use of Condition element is different. > You can use it in: > > a) inside Component element (that is probably what you want) > > > ... > > > the component will be installed if the condition is evaluated to true > > b) inside the Feature element: > > > > > the Feature Level will be changed to 0 if the condition is > evaluated to true > > The Condition element can be used in other ways also. You can find > complete usage in the WIX Help file. > > > Regards > > Stefan > > Venkatesh wrote: > > I ahve a radio button where user selects a version of > productUnicode Or > > ASCI) depending upon I need to install a different binary. I am using > > condition statement under feature. Looks like it is not working > for me. > > I donot know what I am doing wrong here. Please help me. > > > > Code as follows: > > > > > > Display='expand' Level='1' ConfigurableDirectory='TARGETDIR'> > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > -- > Stefan Pavlik | [EMAIL PROTECTED] > Whitestein Technologies s.r.o. | www.whitestein.com > Panenska 28 | 811 03 Bratislava | Slovak Republic > Main +421 2 5443-5502 | Direct +421 2 5930-0735 > > -- Stefan Pavlik | [EMAIL PROTECTED] Whitestein Technologies s.r.o. | www.whitestein.com Panenska 28 | 811 03 Bratislava | Slovak Republic Main +421 2 5443-5502 | Direct +421 2 5930-0735 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users