Comments

3 comments

  • Avatar
    Jake

    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.

    0
    Comment actions Permalink
  • Avatar
    Jake

    Hello,

    Is there a way we can have the env variable take effect without a reboot or user re-log in? I tried source ~/.bashrc after applied the variable, but that didn't work.

    0
    Comment actions Permalink
  • Avatar
    michiel

    Hi Jake,

    You could use the <setEnvironmentVariable>.  This will create the environment variable for the duration of the installation.

    Regards,

    Michiel

     

    0
    Comment actions Permalink

Please sign in to leave a comment.