Hi Scott, If this condition does not apply to a component which installs Web.config file, put <util:XmlFile> in separate <Component> and apply condition to it:
<Component Id=...> <Condition><![CDATA[CLIENTNAME<>SOMECLIENT]]></Condition> <util:XmlFile ... </Component> Basically, <Condition> is a child of <Component> and does not have children of its own: http://wix.sourceforge.net/manual-wix2/wix_xsd_component.htm - Component http://wix.sourceforge.net/manual-wix2/wix_xsd_condition.htm - Condition Alex -----Original Message----- From: Scott Vickery [mailto:svick...@cavucorp.com] Sent: Tuesday, October 27, 2009 11:32 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] util:XmlFile, conditionally set value Any ideas on how to conditionally set a value in an xml? Based on a global variable, CLIENTNAME, I want to set a value in a web.config. Something like the following, but, I know it does not work: <Condition Level="0"><![CDATA[CLIENTNAME<>SOMECLIENT]]> <util:XmlFile Id="UpdateWebConfig" File="[ServiceInstanceDirectory]Web.config" Action="setValue" ElementPath='/configuration/appSettings/add[...@key="SomeKey"[\]]' Name="value" Value="SomeValue" /> </Condition> Thanks, Scott ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users