Got it
I can't believe I have been chasing my tail this whole time I had ElementPath="/configuration/applicationSettings/RollCall.Properties.Settings/setting[...@key='project'[\]]/value" And it needed to be ElementPath="/configuration/applicationSettings/RollCall.Properties.Settings/setting[...@name='project'[\]]/value" Bah! Well thanks for the help....now on to the next step! Chris -----Original Message----- From: Chris Jokinen [mailto:chr...@directron.us] Sent: Thursday, October 15, 2009 2:48 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] failed install, error is Failed to open XML file I'm at a loss... I have this currently <Component Id="RollCall.exe.config" Guid="3b367d78-64a2-4eb5-bf8d-3aa5ada56735"> <File Id="RollCallexeconfig" Source="C:\Documents and Settings\chrisj\My Documents\Visual Studio 2005\Projects\Roll Call\Roll Call\bin\Release\RollCall.exe.config" DiskId="1" KeyPath="yes" /> <util:XmlConfig Id="ChangeProject" File="[#RollCallexeconfig]" Action="create" On="install" ElementPath="/configuration/applicationSettings/RollCall.Properties.Settings/setting[...@key='project'[\]]/value" Value="[PROJECT]" Sequence="1" /> </Component> And it will install, but it does not update the file with the passed value (as listed earlier). If I add the Node attribute to the above code with a value of value the install fails with the wow64 error in the log. If I set node to element it will install the files with a can not locate element error. I do see in the log that the command line argument is seen. Ideas? -----Original Message----- From: Blair [mailto:os...@live.com] Sent: Thursday, October 15, 2009 11:56 AM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] failed install, error is Failed to open XML file Just an aside: For the File attribute of the util:XmlConfig element, instead of "[INSTALLLOCATION]\RollCall.exe.config" you could use "[#RollCallexeconfig]". That would "protect" you against changes in the directory name and even filename of the file you are updating, especially since you are always altering that file every time you replace it and at no other time (so [#RollCallexeconfig] will always be defined when you need it), as a consequence of keeping the XmlConfig tag inside the same component that writes the config file. One rule to make code more maintainable is to reduce the repetition of the same information over and over again. One way to do that is to reference code instead of recreating it all the time. -----Original Message----- From: Chris Jokinen [mailto:chr...@directron.us] Sent: Thursday, October 15, 2009 9:37 AM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] failed install, error is Failed to open XML file The installer copies two files; an exe and a config (the xml file) into the same directory (finally got that to work!). The next thing I need to do is update the xml config file with the 3 command line parameters being supplied during a silent install. Currently I am just testing 1 parameter with a command line like this... Msiexec /i "setup.msi" /qn /l*v c:\install.log PROJECT="test" The goal here is to update the programs xml based config file (RollCall.exe.config) with the value of the parameter PROJECT I changed my wix file to use... <Component Id="RollCall.exe.config" Guid="3b367d78-64a2-4eb5-bf8d-3aa5ada56735"> <File Id="RollCallexeconfig" Source="C:\Documents and Settings\chrisj\My Documents\Visual Studio 2005\Projects\Roll Call\Roll Call\bin\Release\RollCall.exe.config" DiskId="1" KeyPath="yes" /> <util:XmlConfig Id="AddProjectText" File="[INSTALLLOCATION]\RollCall.exe.config" ElementPath="/configuration/applicationSettings/RollCall.Properties.Settings/setting[...@key='project'[\]]/value" Value="[PROJECT]" On="install" Sequence="1" /> </Component> My original concern is that since my file already had a tag with a name of project and that I would need to delete it and then recreate it. I came to this conclusion do to the XmlFile action having only; create and delete actions...and nothing like an update action. From reading your response I see I am missing the usage of create as you have stated below. I will change my XmlConfig to include the action "create" and test again. I feel I am getting close... =) -- Chris -----Original Message----- From: Blair [mailto:os...@live.com] Sent: Thursday, October 15, 2009 11:14 AM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] failed install, error is Failed to open XML file XmlConfig, just like XmlFile, depend on the XML file already existing when the action runs. The syntax between the two actions is slightly different, and the capabilities are slightly different, but I'm not sure what you are referring to when you say "do I need to delete the file first or can I use a create action directly". If the element you want to modify already exists, you can simply change the element by "creating" its value (or the value of its attribute, depending on what you are trying to do). I'm assuming that you were asking about the perceived need to delete the value/element/attribute first (instead of file?). -----Original Message----- From: Chris Jokinen [mailto:chr...@directron.us] Sent: Thursday, October 15, 2009 7:58 AM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] failed install, error is Failed to open XML file Ok, I found this old posting on the same issue I am having. http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg22390.html It would look like I need to switch from XmlFile to XmlConfig to do what I need to do. I see the example that Brian posted was <util:XmlConfig Id="AddElementText" File="[SOMEEXISTINGFILE]" Action="create" ElementPath="/someElement" Node="value" Value="NEW TEXT" On="install" Sequence="1" /> My question is do I need to delete the file first or can I use a create action directly? -----Original Message----- From: Chris Jokinen [mailto:chr...@directron.us] Sent: Wednesday, October 14, 2009 5:15 PM To: 'General discussion for Windows Installer XML toolset.' Subject: [WiX-users] failed install, error is Failed to open XML file This extract is from my msi log file. MSI (s) (6C:D8) [16:49:36:281]: Executing op: CustomActionSchedule(Action=ExecXmlFile,ActionType=3073,Source=BinaryData,Target=ExecXmlFile,CustomActionData=1€0€\RollCall.exe.config€3€0€/configuration/applicationSettings/RollCall.Properties.Settings/setti...@key='project']/value/€value€test) MSI (s) (6C:B8) [16:49:36:281]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIF10.tmp, Entrypoint: ExecXmlFile ExecXmlFile: Found Wow64 API, but unable to link to Wow64DisableWow64FsRedirection function in kernel32.dll ExecXmlFile: Found Wow64 API, but unable to link to Wow64RevertWow64FsRedirection function in kernel32.dll ExecXmlFile: Error 0x8007006e: failed to load XML file: \RollCall.exe.config MSI (s) (6C!28) [16:49:36:312]: Product: setup -- Error 25531. Failed to open XML file \RollCall.exe.config, system error: -2147024786 It looks to have an issue with Wow64…any guidance on this error? Thanks ------------------------------------------------------------------------------ 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 ------------------------------------------------------------------------------ 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 ------------------------------------------------------------------------------ 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 ------------------------------------------------------------------------------ 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