cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Balaji_Vinu
Level 5

Dynamically updating web.config

Hi,
I have to change the value of the tags in the web.config, according to the environment selected during the installation. The values should be taken from Values.xml based on environment selected.

I'm a newbie to installshield. I tried with XML file changes but not much of a luck. Have checked out the help document comes with Installation but not much of a help.

If anyone has worked on something similar, please let me know how to proceed on this......


Values.XML
=========



















Web.config
=========






catalog="ServerName" username="1234" password="1234"/>




catalog="Password" username="1234" password="1234"/>




catalog="Country" username="1234" password="1234"/>




Thanks! 🙂
Labels (1)
0 Kudos
(3) Replies
TheTraveler
Level 8

If you are using Install Shield Script, there is a way. Here is a link.

I use this code to modify an existing web.config file. I'm sure you can modify it to suit your needs.
0 Kudos
Balaji_Vinu
Level 5

TheTraveler,
I tried with the scripts that u have posted. However, my xmls are too big it takes a long time to compare two xmls, because it has to take the value from values.xml and replace the value in web.config file according to the variable name.

Is there any dynamic xml to xml mapping in-build feature available in installshield 2009 or anyother way to do it?
0 Kudos
RobertDickau
Flexera Alumni

Depending on your project type, you might find the InstallShield help topic "Using Windows Installer Properties to Dynamically Modify XML Files" or "Using InstallScript Text Substitution to Dynamically Modify XML Files" to be of use...
0 Kudos