jackfundter
Posts: 12
Joined: Fri Aug 16, 2013 12:30 pm

Edit files made outside the current project

Hello,

We have built a enterprise project that installs our software and with it some .config files.
But now we want to create a second project so the user can edit the settings made in the files later on while preserving the settings when needed and without reinstalling the entire software.
The files will be in the same folder as the .exe but not included in the second project.
Is there a way to do this in AI ?

Thanks,
Jack
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Edit files made outside the current project

Hi Jack and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can follow the steps below:
- go in the Install Parameters page and in the "Application Folder" field set the same path for the second project as it is for the first one
- go in the Files and Folders page and use the [XML File] toolbar button or [Text File Update] toolbar button to edit your configuration files

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jackfundter
Posts: 12
Joined: Fri Aug 16, 2013 12:30 pm

Re: Edit files made outside the current project

These are the steps i try to complete

The file name is known but the full path is unknown it depends on where the user installed the first project.
-the user opens the .exe
- installer loads data from a .config file
- a dialog will contain some edit boxes filled with the information from the .config file from the same folder as the exe
- user edits the edit boxes
- the installer changes the file with the user information entered
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Edit files made outside the current project

Hi Jack,
The file name is known but the full path is unknown it depends on where the user installed the first project.
In order to find the path where the user installed the first version of the product, you can go in the Search page, use the [New Search] toolbar button to add a new search, then click on the [Search Location] toolbar button, select "Registry" and search for the registry entry that contains the path to your product. For example:
  • Root: HKEY_LOCAL_MACHINE
    Key: SOFTWARE\Your Company\Your Application
    Name: Path
    Type: Retrieve the raw value
Then you can use the resulted search property as the default path for this application in the Install Parameters page.
- installer loads data from a .config file
To achieve this, you can create your own custom action that takes the information from the .config file and stores it into properties.
- a dialog will contain some edit boxes filled with the information from the .config file from the same folder as the exe
You can go in the Dialogs page, create a new dialog and design it as you please, then use the properties that contain the information to show it in the edit boxes (i.e. select an edit box, then in the "Properties" pane, "Property" field write a property that contain information taken from the .config file).
- user edits the edit boxes
- the installer changes the file with the user information entered
When the application is installed, the user can edit the information and it can be written in the .config file using the XML File feature.

Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jackfundter
Posts: 12
Joined: Fri Aug 16, 2013 12:30 pm

Re: Edit files made outside the current project

hi, Eusebiu

This solved our problem!

Thanks!

Best regards,
Jack
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Edit files made outside the current project

You're welcome. I'm glad you got this working.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”