I discovered that if the XML file encoding is utf-8 instead of utf-16 that the 
XmlFile action works properly. It appears that the utf-16 encoding prevents the 
XML file from being loaded properly, which is why I was seeing that the file 
was opened properly in filemon but XmlFile was still failing to load. I'm 
cc'ing wix-devs so that it can be flagged as a bug if need be.

John

-----Original Message-----
From: John Hancock (HSG) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 22, 2007 1:30 PM
To: Alexei; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] XmlFile failing to open installed file

I wondered if that was the case as well, but based on looking at the install 
log and the file activity using filemon, the file does appear to get installed 
before the XmlFile action is executed and fails.

John


-----Original Message-----
From: Alexei [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 22, 2007 12:09 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] XmlFile failing to open installed file


Is the xml file part of the same install that tries to modify it? If so you
will probably need some sort of of deferred custom action, as the file will
probably not have been copied over prior to the XmlConfig being run.



John Hancock (HSG) wrote:
>
> Based on some information posted elsewhere, it looked like the double
> slash might have been necessary. Regardless, it doesn't work with either
> the single slash or double slash.
>
> Thanks,
>
> John
>
>
> -----Original Message-----
> From: Julie Campbell [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 22, 2007 11:42 AM
> To: wix-users@lists.sourceforge.net; John Hancock (HSG)
> Subject: RE: [WiX-users] XmlFile failing to open installed file
>
> John,
>
> Why the double slashes at the beginning of your element names?  Just one
> slash...
>
> <util:XmlConfig
>     Id='ADD_SOME_TOC'
>     Sequence='26001'
>     Action='create'
>     On='install'
>     Name='toc_replaceme'
>     Node='element'
>     ElementPath='/plugin/extension'
>     File='[INSTALLDIR]plugin.xml'
>     VerifyPath='/plugin/extension/[EMAIL PROTECTED]"SomeTOC.xml"[\]]' />
>
> Julie Campbell
> [EMAIL PROTECTED]
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 22 Aug 2007 08:33:10 -0700
> From: "John Hancock (HSG)" <[EMAIL PROTECTED]>
> Subject: [WiX-users] XmlFile failing to open installed file
> To: "wix-users@lists.sourceforge.net"
>         <wix-users@lists.sourceforge.net>
> Message-ID:
>
> <[EMAIL PROTECTED]
> soft.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
> I'm having problems with the XmlFile custom action using Wix 3.0 where the
> installer says it fails to open the installed XML file. The installer is
> being run on a Windows Server 2003 machine with SP1.
>
> In particular, I have something like the following:
>
>       <Component Id="XMLConfig"  Guid="YOUR-GUID-HERE" DiskId="1">
>         <File Id="Config.xml" Name="Config.xml" KeyPath="yes" />
>         <util:XmlFile Id ="Config_Name" File="[INSTALLLOCATION]Config.xml"
> Action="setValue" ElementPath="//Config/Name" Value="[NAME]"/>
>         <util:XmlFile Id ="Config_IPAddress"
> File="[INSTALLLOCATION]Config.xml" Action="setValue"
> ElementPath="//Config/IPAddress" Value="[IPADDRESS]"/>
>       </Component>
>
> The XML file is installed in the proper location and when it goes to use
> the
> custom action, it looks in the proper location for the file, but I get an
> error that causes the installation to abort. The error in the installation
> logfile looks like:
>
> ExecXmlFile: Error 0x8007006e: failed to load XML file:
> C:\inetpub\MyDirectory\Config.xml
>
> If I have filemon open, however, at the time the ExecXmlFile fails, it
> claims that the file READ request returned SUCCESS. The paths appear
> correct
> and if I leave out the XmlFile actions the file installs properly in the
> location expected.
>
> Anyone have any ideas what's going wrong? My Config.xml looks like the
> following:
>
>  <?xml version="1.0" encoding="utf-16"?>
> <Config>
>  <Name>servername</Name>
>  <IPAddress>serverIP</IPAddress>
> </Config>
>
>
> Thanks for any assistance!
>
> John
>
>
>
>
> _____________________________________________________________________________
> Scanned by IBM Email Security Management Services powered by MessageLabs.
> For more information please visit http://www.ers.ibm.com
> _____________________________________________________________________________
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>

--
View this message in context: 
http://www.nabble.com/Re%3A-XmlFile-failing-to-open-installed-file-tf4312413.html#a12277941
Sent from the wix-users mailing list archive at Nabble.com.






-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to