I am building a web service installation using InstallShield 2012, and I need to modify the Web.config file of my app based on user input. I have introduced the PromptServerAndDatabase dialog just after the DestinationFolder dialog. I have also set up the Web.config file in the XML File Changes view in InstallShield. Here is my basic web.config file structure:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
...
</configSections>
<appSettings>
<add key="DatabaseServer" value="sql08r2">sql08r2</add>
<add key="DatabaseName" value="UserDatabaseName">UserDatabaseName</add>
</appSettings>
...
</configuration>
At this time I can successfully change the literal value of a node, but I cannot change an attribute of a node.
Here's the structure within InstallShield in the XML File Changes view:
Also, here's the Advanced tab which is virtually identical for all three nodes. Both nodes associated with Database Name use the same property, while the node for Server Name uses the property [SERVER_NAME] (not shown):
After running the installer the Web.config file is successfully updated. The values of the DatabaseName and ServerName nodes are updated. However, the value for the "value" attribute in the DatabaseName node is not, although it should reflect the same text as the node's actual value. Once I perfect this I will need to duplicate it for the ServerName node, but I left that out for simplicity.
I have done some additional research on this and I found this site which was very helpful overall, but didn't resolve this issue for me:
http://helpnet.installshield.com/installshield16helplib/XML-XPath.htm
Maybe the answer is there and I am just missing it, IDK.
Thanks for any help offered on this.