PDA

View Full Version : Enviroinment Variables



visi_al
07-13-2004, 04:54 AM
Hi to all of you.
This is my first post and I really need your help.
I need to modify the JAVA_HOME enviroinment variable and to add to it a new value. The path that need to add is in the directory where the user installs its application, so it is needed to determine it during runtime. How can I do this?

Thanks.

Steff74
07-13-2004, 05:02 AM
I get the install directory via $P(files1.absoluteInstallLocation)

greetings

Steff

visi_al
07-13-2004, 05:08 AM
Thanks for the reply. The problem is that I am new to InstallShied and I would be very gratefull if send me a code example demonstrating the use of $P(files1.absoluteInstallLocation).
Also, can it be used in java code?

Steff74
07-13-2004, 05:21 AM
In Organization->Installation Design you can can add features of your installation. Within your feature you can add components. Again within a component you can add an Action. Add a Environment Variable Update Action. Set variable name to JAVA_HOME and value to for example "$P(files1.absoluteInstallLocation)\_jvm"

Try it, i didn't test it

Greetings

Steff

MarloV
07-14-2004, 09:54 AM
In the above example, "files1" represents the Bean ID property of a Files action, which will only give the installation location of the files within that Files Action.

To obtain and use the installation location of the entire product, use $P(absoluteInstallLocation).

It would probably be helpful for you to review the Help Library topics on String Resolution, which are located in the Reference Information section. You can also access these topics on our Web site at HelpNet (http://helpnet.installshield.com/Robo/BIN/Robo.dll?tpc=/robo/projects/isxuniversalhelplibrary/topics/string_resolution.htm).

Hope that helps!