I have several questions/issues with using the XmlFile extension.
a) The documentation states that the 'Permanent' attribute specifies
whether or not the modification should be removed on uninstall. I am
explicitly setting this attribute to no and it doesn't even attempt to
change the file on uninstall (nothing in the MSI log references the xml
file)
b) In a typical app.config file where you have a few generic keys it seems
that the XPath doesn't really work at all. If I have no value in the config
file at all
<configuration>
<appSettings>
</appSettings>
</configuration>
and I try to add a node (add, and then set the key to something and then set
the value based on this key there is no issue) If I try to add another node
and then set it's attributes it does not move to the second entry.
I tried
<util:XmlFile Id="utxmHDSC1"
Action="createElement"
ElementPath="/configuration/appSettings"
Name="add"
Permanent="no"
File="$(var.RegistrationProductConfig)"
Value="HSConfig.exe.config"
Sequence="1"/>
<util:XmlFile Id="utxmHDSC2"
Action="setValue"
ElementPath="./configuration/appSettings[\[]add='HSConfig.exe.config'[\]]/add"
Name="ProductName"
Permanent="no"
File="$(var.RegistrationProductConfig)"
Value="$(var.RegistrationProductName)"
Sequence="2" />
And this 'appeared' to work, but then when I went to use it a second time
for a different component it failed saying it couldn't find the node.
I found that if I had any nodes
<configuration>
<appSettings>
<add key="1" value="2"/>
</appSettings>
</configuration>
This entry itself wouldn't work. So it only 'worked' if it was the first
and only entry in the file.
Because it didn't work I stripped the second down to just add the node and
set an attribute, it ended up overwriting my first node's attribute rather
than setting it on the second one.
Has there been any thought to 'nesting' some of the XmlFile commands so that
once you created a node or selected a node you could work within it?
From all I've read it looks like the functionality works for people who just
want to change a few already defined values but I would like to use it for
constructing some base configuration information.
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users