tsantos
Posts: 14
Joined: Sat Jan 12, 2008 2:49 pm
Contact: ICQ

Edit text file during installation

Hello!

I have an application that has configuration files in XML extensions, propertie and config extensions. For the XML extensions I'm using the XML Edit tool to edit the files during the installation. I'm prompting the user to enter the information.

What can I do to edit the propertie and config files? They are TXT files with different extensions.

Here is an example of one config file:

#
# Set the directory where Lucene indexes are stored.
#
lucene.dir=C:/WCM/storage/

I'd like to try this: lucene.dir=[APPDIR]

I want to prompt the user to enter the storage directory with a dialog as I'm doing with the XML files.

I also want to edit the services file inside ...\windows\system32\drivers\etc folder

I want to open the file and add two lines:

configurationone 3003 #Server ONE
configurationtwo 8000 #Server TWO


Does any one can help?

Thanks a lot!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Edit text file during installation

Hi,
What can I do to edit the propertie and config files? They are TXT files with different extensions.
There is a similar discussion on the forum, please take a look:
http://www.advancedinstaller.com/forums ... f=2&t=5286
I want to prompt the user to enter the storage directory with a dialog as I'm doing with the XML files.
This can be done by using a custom dialog like explained in our tutorial. If you want the user to browse for the folder you can follow our how-to.
I also want to edit the services file inside ...\windows\system32\drivers\etc folder
I want to open the file and add two lines:
configurationone 3003 #Server ONE
configurationtwo 8000 #Server TWO
For this file you can use the same approach you will use for the TXT files. Note that the path of the "system32" folder is contained by the [SystemFolder] property.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”