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.Service.dll.config"
> />
>             <util:XmlFile Id="ModifyIsMyCorpServer"
>                           SelectionLanguage="XPath"
>
> File="[WixLibRedirectFolder]MyCorp.Enterprise.Service.dll.config"
>
>
> ElementPath="//applicationSettings/MyCorp.Enterprise.Service.Properties.Settings/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\TitusEnterpriseManagementServicesMergeModule\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.Service.dll.config"
> />
>             <util:XmlConfig Id="DeleteClientGloriaConnectionString"
>                         Action="delete"
>
> File="[WixLibRedirectFolder]MyCorp.Enterprise.Service.dll.config"
>
>
> ElementPath="//applicationSettings/MyCorp.Enterprise.Service.Properties.Settings/setting[\[]@name='IsMyCorpServer'[\]]/value"
>
>
> VerifyPath="//applicationSettings/MyCorp.Enterprise.Service.Properties.Settings/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\TitusEnterpriseManagementServicesMergeModule\MergeModule.wxs
> 34      1       TitusEnterpriseManagementServicesMergeModule
>
>
> Steve
>
>
>
> --
> View this message in context:
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Conditional-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

Reply via email to