amurphy100
Posts: 12
Joined: Mon Jan 15, 2007 12:41 pm

Modifying INI Files

I am having problems with following scenario, please can someone help.

I need to be able to create an ini file entry if it does not exist, but not update it if it does exist. I have tried setting the 'create if does not exist' flag in the ini file editor and that does indeed create the entry if it does not exist, however it still updates an entry if it does exist, can you please help.

Cheers :cry:
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I cannot reproduce this. With "Create only if it does not exist" action the key value it's not updated. I test this and it works fine. Please try to reproduce this on other computer and let me know if you encounter the same behavior.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
amurphy100
Posts: 12
Joined: Mon Jan 15, 2007 12:41 pm

Hi Gigi,

Thanks for the reply, i have tried it on 2 different computers using with two different installs and get the same results.

Here are the steps I am taking

1) Create a blank professional install
2) Add in a single executable
3) Use the new ini file menu to create a new ini file
4) Add a single section to the ini file called Default Paths
5) Set the Key to be Source Path
6) Set the value to [APPDIR]files
7) Set the action to Create only if does not exist
8) Run the install
9) Open the directory the install has been placed and manualy edit the Source Path section of ini file and save it
10) In advanced installer up th eproduct version number and click yes to 'New product version' dialog when building
11) Run the install
12) Open the directory the install has been placed and manualy open the ini file. The source path has been altered by the install again.

I hope this helps you replicate the issue.

Many thanks for your help

Andrew
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Andrew,

On upgrade the old version of your product is uninstalled (the INI file deleted) before installing the new one (the INI file is copied with default values).

To avoid this behavior you can do like this:
http://www.advancedinstaller.com/user-g ... -file.html

Please let me know if you encounter any problems.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
amurphy100
Posts: 12
Joined: Mon Jan 15, 2007 12:41 pm

Hi Gigi,

I understand the thoery of what you say however in reality it proves a little tricky.

As the INI file is not an installed file but one that is created during the install (by the parameters set in the ini editor panel) the ini file in question does not display in the Organisation window and therefore there is not option to make it a permanent file and therefore i am back to square one?

Please can you advice me further

Regards

Andrew
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Andrew,

Please try the second method (backup the file and restore it at the end of the installation):
http://www.advancedinstaller.com/user-g ... le-ca.html

Let me know how this works.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”