Writing to web.config file

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

Writing to web.config file

Postby adeid » Wed Oct 25, 2006 6:32 am

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:

Postby MichaelNesmith » Wed Oct 25, 2006 6:34 am

You can use the Write to Text File command.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
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

Postby adeid » Wed Oct 25, 2006 7:01 am

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:

Postby MichaelNesmith » Wed Oct 25, 2006 10:44 am

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

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

adeid
Posts: 6
Joined: Wed Oct 25, 2006 2:51 am

Postby adeid » Tue Oct 31, 2006 11:12 am

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

Postby Gizm0 » Tue Oct 31, 2006 1:37 pm

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\"
InstallAware Software Corporation

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Oct 31, 2006 7:29 pm

Also check the EditFile plug-in, available for free on this forum.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 32 guests