How do I create a new system environment variable?

asked 06 Sep '11, 08:25

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%


You can create a system environment variable using a addEnvironmentVariable action. You will have to include a section like the one below inside an action list section of your XML installer project file. On Unix platforms, the variable will be added to any of the shell configuration files: ~/.bashrc, ~/.profile. On Windows, the environment variable will be created in the registry.

       <addEnvironmentVariable>
             <name>MYAPP_HOME</name>
             <value>${installdir}</value>
       </addEnvironmentVariable>

Note that in Unix, the effect will not take place until the user logs in again.

link

answered 06 Sep '11, 08:28

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×41
×14
×12

Asked: 06 Sep '11, 08:25

Seen: 3,213 times

Last updated: 12 Sep '11, 04:16