Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-27 Thread TimM
Okay I do have this working now, but have one more question on this... If the element keys exists and you only have to change the values then we can simply use the XmlFile action=setvalue method. If the element keys do not exist then I had to use the XmlFile action=createElement and a few

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-15 Thread TimM
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

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-15 Thread Carter Young
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

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-15 Thread James Buchan
Hi Tim, Please see (much further) below an implementation I use. It will turn this: Configuration Extensions Data /Data /Extensions /Configuration Into: Configuration Extensions Data Extension

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-14 Thread TimM
Okay do you have a small example of using XmlConfig to create and set the value of a key, as I was also trying XmlConfig and I did not get any errors, but it did not do anything to the .config file? Thanks. -- View this message in context:

[WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread TimM
Okay newbie question here concerning the updating of a .config file during install, using WiX 3.7. I was given the task to update a new .config file during our install and I found the documentation for XmlConfig Element (Util Extension):

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread TimM
Okay I tried the following: util:XmlConfig Id=ServiceInfo Action=create ElementPath=/configuration/appSettings/ Name=ServiceInfo Value=[LYNC_SERVER_ADDRESS] File=[INSTALLDIR]RemoteInk.exe.config On=install Sequence=9 / This one did nothing at all,

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread TimM
Okay I am re-looking at the XmlConfig method as described in the following link: http://sourceforge.net/p/wix/mailman/message/20326106/ And when I use the example that is in that link I get the following failure in the install: Failed to find node:

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread Carter Young
Try this: XmlFile Id=ModifyServiceLocation Action=setValue ElementPath=/configuration/appSettings/add[@key='ServiceLocation']/@value File=[INSTALLLOCATION]\sample.config Value=[SERVICELOCATION]/ as outlined here: http://weblogs.asp.net/lorenh/archive/2005/10/13/427398.aspx

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread TimM
Thanks eyoung, I made the recommended changes: util:XmlFile Id=SetServiceInfo Action=setValue ElementPath=/configuration/appSettings/add[@key='ServiceInfo']/@value Value=[LYNC_SERVER_ADDRESS] File=[INSTALLDIR]RemoteInk.exe.config Sequence=5 / But when I build the install I get the following

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread Carter Young
I believe the File comes before the Value... Also I think the File Location needs a backslash. Quoting TimM timmay...@smarttech.com: Thanks eyoung, I made the recommended changes: util:XmlFile Id=SetServiceInfo Action=setValue

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread John Cooper
You need to escape the [] in the ElementPath as these have special meaning to the installer. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS  66227 Office:  913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread John Cooper
In general, path properties in WiX and in MSI installers in general already have a trailing '\'. However, I hate the [INSTALLDIR]Remotelnk.exe.config idiom. If you're installing this file (and almost certainly you are), give it a File@Id element. Then you can reference it's absolute path

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread TimM
Thanks John, I made that change and the build worked but when I ran the install to test it I get the following error: Failed to find node: //configuration/appSettings/add[@key='ServiceInfo']/@value in XML file: C:\Program Files (x86)\CompanyName\Product\Product.exe.config, system error:

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread John Cooper
You need to add a Name=value attribute. Otherwise, your code is trying to write to the inner text. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS  66227 Office:  913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread TimM
I added the Name=value entry, but I still get the same error??? util:XmlFile Id=SetServiceInfo Action=setValue Name=value ElementPath=//configuration/appSettings/add[\[]@key='ServiceInfo'[\]]/@value File=[#RemoteInk.exe.config] Value=[LYNC_SERVER_ADDRESS] Sequence=5 / So I am still at a loss as

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread Carter Young
From the Example I gave Earlier: XmlFile Id=ModifyServiceLocation Action=setValue ElementPath=/configuration/appSettings/add[@key='ServiceLocation']/@value File=[INSTALLLOCATION]\sample.config Value=[SERVICELOCATION]/ Which outputs: --sample.config-- configuration appSettings add

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread TimM
Okay I must be missing something as as I mentioned above this one did write to the file, just did not write it correctly: util:XmlFile Id=ServiceInfo Action=setValue ElementPath=/configuration/appSettings Name=ServiceInfo Value=[LYNC_SERVER_ADDRESS] File=[INSTALLDIR]RemoteInk.exe.config / When

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread Carter Young
I had this buried in my bookmarks for just such an occassion :) Honestly, I need it for situations like yours. Look for the items related to Create 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

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread TimM
Well I created the Sample and it worked correctly, using exactly what was shown. So then I simply substituted my app.config file with the sample.config file and built and ran the test again and it failed? So I figured that it was my .config file that was the issue, but then I simply added the

Re: [WiX-users] Which is best to use in my case: XmlFile or XmlConfig?

2014-05-13 Thread John Cooper
Yes. XmlFile is create for setting things that already exist. If you need more than that, I tend to choose XmlConfig. Note that I usually write the XPath to the element, and then write to the attribute as specified in Name. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry