Also you could have 2 different components - one for each service type - with opposite conditions. It'll be easier to maintain if the 2 versions of the files differ further as time goes on.
-----Original Message----- From: Rob Mensching [mailto:r...@robmensching.com] Sent: 20 October 2012 18:43 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Conditional util:XmlFile change... Condition the Component. On Fri, Oct 19, 2012 at 1:44 PM, StevenOgilvie <sogil...@msn.com> wrote: > I have a .config file I need to change if the install running is the > client install and NOT the server install (we share the services > between client and server installations) > > I have this code: > <Component Id="cmp_EnterpriseServiceConfig" > Guid="{76DCFB0D-B7BD-4089-AD4D-945931CD73FD}" Permanent="no" > SharedDllRefCount="yes" Shared="yes"> > <File Id="file_EnterpriseServiceConfig" KeyPath="yes" > Name="MyCorp.Enterprise.Service.dll.config" > > Source="$(var.tssSourcePath)\MyCorp.Enterprise.Service\MyCorp.Enterprise.Serv ice.dll.config" > /> > <util:XmlFile Id="ModifyIsMyCorpServer" > SelectionLanguage="XPath" > > File="[WixLibRedirectFolder]MyCorp.Enterprise.Service.dll.config" > > > ElementPath="//applicationSettings/MyCorp.Enterprise.Service.Properties.Setti ngs/setting[\[]@name='IsMyCorpServer'[\]]/value" > Action="setValue" > Sequence="1" > Value="false"/> > > and I want to do something like this: > < ! [CDATA[CLIENT_INSTALL="1"] ] > > > but I can't add that conditional since I get this error: > Error 41 Schema validation failed with the following error at line > 1, column > 3113: The element cannot contain text. Content model is empty. > C:\Dev\Core > > Technologies\Main\Setup\TitusServices\TitusEnterpriseManagementServicesMergeM odule\MergeModule.wxs > 18 1 TitusEnterpriseManagementServicesMergeModule > > > how can I make a XmlFile change conditional? Can't use XmlConfig > element since I have a text in the Value="false" > > <Component Id="cmp_EnterpriseServiceConfig" > Guid="{76DCFB0D-B7BD-4089-AD4D-945931CD73FD}" Permanent="no" > SharedDllRefCount="yes" Shared="yes"> > <File Id="file_EnterpriseServiceConfig" KeyPath="yes" > Name="MyCorp.Enterprise.Service.dll.config" > > Source="$(var.tssSourcePath)\MyCorp.Enterprise.Service\MyCorp.Enterprise.Serv ice.dll.config" > /> > <util:XmlConfig Id="DeleteClientGloriaConnectionString" > Action="delete" > > File="[WixLibRedirectFolder]MyCorp.Enterprise.Service.dll.config" > > > ElementPath="//applicationSettings/MyCorp.Enterprise.Service.Properties.Setti ngs/setting[\[]@name='IsMyCorpServer'[\]]/value" > > > VerifyPath="//applicationSettings/MyCorp.Enterprise.Service.Properties.Settin gs/setting[\[]@name='IsMyCorpServer'[\]]/value" > On="install" > Node="element" > Sequence="2" > Value="false" > > < ! [CDATA[CLIENT_INSTALL="1"] ] > > </util:XmlConfig> > since I get this error: > Error 34 The util:XmlConfig/@Value attribute cannot be specified > when the > element has body text as well. Specify either the attribute or the > body, but > not both. C:\Dev\Core > > Technologies\Main\Setup\TitusServices\TitusEnterpriseManagementServicesMergeM odule\MergeModule.wxs > 34 1 TitusEnterpriseManagementServicesMergeModule > > > Steve > > > > -- > View this message in context: > http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Conditio > nal-util-XmlFile-change-tp7581487.html > Sent from the wix-users mailing list archive at Nabble.com. > > > ---------------------------------------------------------------------- > -------- Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics Download AppDynamics Lite > for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > -- virtually, Rob Mensching http://RobMensching.com LLC ----------------------------------------------------------------------------- - Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users