How do I create a new system environment variable?
search cancel

How do I create a new system environment variable?

book

Article ID: 321479

calendar_today

Updated On: 10-10-2019

Products

VMware InstallBuilder

Issue/Introduction

Symptoms:

How do I create a new system environment variable?


Resolution

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.