Ini file - Advanced Installer Community
francis.matamoros
Posts: 15
Joined: Fri Mar 23, 2018 7:39 pm

Ini file

Hello, I have a project created in which during the installation the user is asked for some values that are stored in an ini file in the installation folder. What I need is that that INI is not removed during an update or when uninstalling the application.
Thank you.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Ini file

Hello Francis,

In order to achieve that, please have a look over our "How do I prevent a file or registry entry from being uninstalled or repaired?" article.

Hope it helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
francis.matamoros
Posts: 15
Joined: Fri Mar 23, 2018 7:39 pm

Re: Ini file

Hello, thank you, I have managed not to get it deleted or overwritten in an update with method 2.
On the other hand, I do not fully understand what the following paragraphs mean:
As a general idea, it is not recommended to use the installed file to store any user data. The best way would be for the application to create a new file that stores it. At the simplest form, this method would consist of simply creating a copy of the installed file and modifying that.

If the application cannot create the file from scratch it should use the installed file as a template for the files that store the user data, meaning that the application uses the installed files as a starting point. It merges the user data with the template data to create the new file.

I don't know how to implement this functionality in my installer. Could you please show me an example? Thank you.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Ini file

Hello Francis,

Please note that you do not need to use the second method if you are already using the first one.

With that being said, you do not need to worry about that.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”