PDA

View Full Version : Path Variables using Environment varialbes



jstarbird
11-30-2018, 08:17 PM
Forgive the newb question, it's been years since I used InstallShield and I'm hitting a wall on this one, what should be a, minor issue.
I have searched online thru the help and found nothing that works so now posting here.

I have an InstallScript project and I am wanting to use a System environment variable as the Value of a Path Variable. The Environment variable is set so not sure why this just doesn't work.
I've tried referencing anyway I can think of, %VAR_NAME%, [VAR_NAME], <VAR_NAME> and I also had found one suggestion about creating an Environment Path Variable and referencing the system environment variable there and then referencing that new variable everywhere else in InstallScript but nothing works.

I'm looking to use this for the paths to my component source files.

The InstallShield docs/help is ridiculous, let us explain what something is but not show you how to actually use it! Oh so useful.

DanGalender
12-02-2018, 01:30 PM
To create an Environment Path Variable, you would do the following:

In the Path Variables view, click the New button in the toolbar at the top.
From the drop-down in the fifth column, Type, select Environment.
In the first column, enter your path variable name (e.g., MyPathVar)
In the second column, enter the just the name of the environment variable whose value you want MyPathVar to be assigned. Do not use any delimiters!

In the third column, you will see the value of your path variable.

In your project, you would use the construct <MyPathVar> to reference that value.

jstarbird
12-03-2018, 12:56 PM
To create an Environment Path Variable, you would do the following:

In the Path Variables view, click the New button in the toolbar at the top.
From the drop-down in the fifth column, Type, select Environment.
In the first column, enter your path variable name (e.g., MyPathVar)
In the second column, enter the just the name of the environment variable whose value you want MyPathVar to be assigned. Do not use any delimiters!

In the third column, you will see the value of your path variable.

In your project, you would use the construct <MyPathVar> to reference that value.

Thanks! Never occurred to me to not use some kind of delimiters.