I'm attempting to figure out how to make XmlConfig behave properly on an upgrade. It works beautifully on install and uninstall, but not so well when I try to do an upgrade.
This is with WiX 3.0.2813.0 Here's a component: <Component Id="dataservices.php" Guid="MY_GUID"> <File Id="dataservices.php" ... /> <!-- register this file in my-tabs.xml on install: <tab name="Data Services" enabled="True" url="subdir/data-services.php" /> --> <util:XmlConfig Id="MakeDataServicesTab" File="[xml_dir]my-tabs.xml" Action="create" Node="element" On="install" Sequence="1" ElementPath="/my-tabs" VerifyPath="/my-tabs/[EMAIL PROTECTED]'Data Services'[\]]" Name="tab" /> <util:XmlConfig Id="DataServicesTabAttrName" File="[xml_dir]my-tabs.xml" Action="create" Node="value" On="install" Sequence="2" ElementPath="/my-tabs/tab[\[]not(@name)[\]]" VerifyPath="[EMAIL PROTECTED]'Data Services'[\]]" Name="name" Value="Data Services" /> <util:XmlConfig Id="DataServicesTabAttrEnabled" File="[xml_dir]my-tabs.xml" Action="create" Node="value" On="install" Sequence="3" ElementPath="/my-tabs/[EMAIL PROTECTED]'Data Services'[\]]" Name="enabled" Value="True" /> <util:XmlConfig Id="DataServicesTabAttrUrl" File="[xml_dir]my-tabs.xml" Action="create" Node="value" On="install" Sequence="4" ElementPath="/my-tabs/[EMAIL PROTECTED]'Data Services'[\]]" Name="url" Value="subdir/data-services.php" /> <!-- remove the line: <tab name="Data Services" enabled="True" url="subdir/data-services.php" /> --> <util:XmlConfig Id="RemoveDataServicesTab" File="[xml_dir]my-tabs.xml" Action="delete" Node="element" On="uninstall" Sequence="5" ElementPath="/my-tabs" VerifyPath="[EMAIL PROTECTED]'Data Services'[\]] " /> </Component> -------------------- When I attempt a major upgrade, I get the following output in a verbose log file: MSI (s) (C0:88) [12:38:44:773]: Hello, I'm your 32bit Elevated custom action server. ExecXmlConfig: Configuring Xml File: C:\temp\htdocs\my\xml\my-tabs.xml ExecXmlConfig: Error 0x800710d8: failed to find node: /my-tabs/tab in XML file: C:\temp\htdocs\my\xml\my-tabs.xml MSI (c) (3C:00) [12:38:44:824]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg Error 25542. Failed to find node: /my-tabs/tab[not(@name)] in XML file: C:\temp\htdocs\my\xml\my-tabs.xml, system error: -2147020584 MSI (s) (C0!E8) [12:54:04:224]: Product: Tab installer -- Error 25542. Failed to find node: /my-tabs/tab[not(@name)] in XML file: C:\temp\htdocs\my\xml\my-tabs.xml, system error: -2147020584 ---------------------- It seems that: 1. On an upgrade, the VerifyPath for the "MakeDataServicesTab" element create exists, so no no-name node is created. (Repeat THAT five times fast.) 2. The add-a-name-to-the-no-name-node step at "DataServicesTabAttrName" fails because #1 was skipped. I couldn't find any way to change the VerifyPath of #2 that would get around the error message. When I look at the code in XmlConfig.cpp, it seems that the ElementPath is checked first, and thus the VerifyPath check never comes into play. Am I missing something, or is this actually a bug? Thanks! James Scott ------------------------------------------------------------------------- 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