It works for all of them... Read this again...

http://blogs.technet.com/b/alexshev/archive/2009/05/27/from-msi-to-wix-part-25-installable-items-updating-xml-files-using-xmlfile.aspx

Carter

Quoting TimM <timmay...@smarttech.com>:

> Okay still having an issue with util:XmlConfig. If I use the following:
> <Component Id="ProgramComponent"
> Guid="{68FCE723-347D-4FD9-A3DF-3BB5A961F0E0}">
>       <File Id="sample.config" Source="sample.config" Vital="yes" DiskId="1"/>
>       <util:XmlFile Id="ModifyServiceLocation" Action="setValue"
>
> ElementPath="/configuration/appSettings/add[\[]@key='ServiceLocation'[\]]/@value"
>                           File="[#sample.config]" 
> Value="[LYNC_SERVER_ADDRESS]"/>
>       <util:XmlConfig Id="SetClientMode" Action="create"
> ElementPath="//configuration/appSettings"
>                                 File="[#sample.config]" Name="ClientMode"
> Node="value" On="install"
>                                 PreserveModifiedDate="yes" Sequence="100"
> Value="[CLIENT_MODE]" />
> </Component>
>
> Then the install will work and no errors, the .config file will look like
> the following:
>
> <configuration>
>   <appSettings ClientMode="Personal">
>     <add key="ServiceLocation"
> value="net.tcp://example.com:54321/RemoteInk"/>
>   </appSettings>
> </configuration>
>
> As you can see the ClientMode is in the wrong location, it should look like
> this:
> <configuration>
>   <appSettings>
>     <add key="ServiceLocation"
> value="net.tcp://example.com:54321/RemoteInk"/>
>     <add key="ClientMode" value="Personal"/>
>   </appSettings>
> </configuration>
>
> So if I change the util:XmlConfig line to the following then I get the
> 'Failed to find node:' error:
> <util:XmlConfig Id="SetClientMode" Action="create"
> ElementPath="//configuration/appSettings/add[\[]@key='ClientMode'[\]]/@value"
> File="[#sample.config]" Name="ClientMode" Node="value" On="install"
> PreserveModifiedDate="yes" Sequence="100" Value="[CLIENT_MODE]" />
>
> Now the util:XmlFile element does work, but only for element keys that
> already exist and you only need to change the value on, but if the element
> key does not exist then XmlFile does not work. So we have to use the
> XmlConfig element and therefore I need to get this working...
>
> So if anyone can tell me what is wrong with my XmlConfig element line I
> would appreciate it.....
>
>
>
>
>
>
>
>
> --
> View this message in context:  
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Which-is-best-to-use-in-my-case-XmlFile-or-XmlConfig-tp7594691p7594754.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform  
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>




------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to