Writing to web.config file

Got a problem you cannot solve? Try here.
Post Reply
adeid
Posts: 6
Joined: Wed Oct 25, 2006 2:51 am

Writing to web.config file

Post by adeid »

Hi,
Please can you tell me how I can write to web.config file of my web application during installation? I want to add some configuration settings to this file during installation.
Thank you.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

You can use the Write to Text File command.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
adeid
Posts: 6
Joined: Wed Oct 25, 2006 2:51 am

Writing to web.config file

Post by adeid »

Please can I get script on how to use "Write to Text File command" to acomplish this?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Please drag-drop or type to insert the Write to Text File command into your setup script, and press F1 while the window is showing to get command help.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
adeid
Posts: 6
Joined: Wed Oct 25, 2006 2:51 am

Post by adeid »

The "Write Text File Command" can not help in this situation because it can only write to the begining or end of a file. But I need to write to the "application settings" section of a web.config file. Any suggestion?
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Post by Gizm0 »

Multiple Write Text Commands! :)
First call to write the start part of file, then the application block, then the rest of it.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Also check the EditFile plug-in, available for free on this forum.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply