jasoncd
Posts: 49
Joined: Thu Jan 29, 2009 4:48 pm

Path variables

I've been using AI for several years now and there's one thing that I've never understood. Let's say I create a new project. All the source files will be located here:
C:\SourceFiles

So, I set this path as the Project Root Path and I enable Path Variables.

When I drag files into the installer, it tries to convert to this:

<WindowsVolume>SourceFiles

Why? The files are in the root path, so why is there a path at all? It should just be the name of the file. If I open the AIP file in a text editor and delete the path manually, it works just fine.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Path variables

Hello,

Path Variables are used to specify locations on the file system. The project resources location may be specified relative to these path variables. In this manner you can avoid references to a hard-coded location on your file system which are very hard to maintain for every resource.
When I drag files into the installer, it tries to convert to this:

<WindowsVolume>SourceFiles
That is because you've selected "Prompt for each file that can use path variables" option in "Edit Project Options". You could select "Automatically convert using existing path variables" option instead.

If path variables are used, when a file is added to your project, its's path will be converted to a path relative to a variable defined in Path Variables Editor

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jasoncd
Posts: 49
Joined: Thu Jan 29, 2009 4:48 pm

Re: Path variables

Ok. So using path variables *forces* to it use a path variable, even if the file is in the project root. Because there is no path variable defined for the project root, it uses WindowsVolume. It took awhile to find the Path Variables dialog, but now I see what's already defined. Thanks for the quick response.

Edit - It would be nice if you could use path variables, but only for files outside the project root.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Path variables

Hello,

You are welcome!
It would be nice if you could use path variables, but only for files outside the project root.
Unfortunately this is not possible. Maybe we will consider this improvement in the future. Thank you for your suggestion. However, you could enable "Propt for each file that can use path variables" option in "Edit Project options" - "Path Variables" tab and manually decide which files should use path variables when adding them to your project.

Please let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”