bcalmac
Posts: 4
Joined: Tue Jul 28, 2015 2:34 am

Conditionally add folder to PATH

Here's my use case: I want to add a directory to the PATH env variable only if an application is not already available on the PATH.

How can I achieve this in AI?

Thank you.
Irina
Posts: 113
Joined: Mon Apr 27, 2015 11:42 am

Re: Conditionally add folder to PATH

Hello,

In order to achieve this you have to create a New Environment Variable in the Environment Variable page in the System Changes section, with the values:

Code: Select all

Name: Path
Value: [directory path you need]
Component: [select the component it is related to]

On install: Create or update
Remove on uninstall: checked
System variable: checked
After that, go in the Organization page, and set the condition for the related component to

Code: Select all

not (%Path >< [directory path you need]) 
Please let us know if you have any more questions.

Kind regards,
Irina
Ecaterina Irina Grosu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”