Home » How to Set Environment Variables

How to Set Environment Variables

Environment variables are flags that you set outside an application that the application reacts to.  Applications and libraries like RLM read environment variables that they define.  Some RLM environment variables are RLM_ACT_TIMEOUT (adjusts the timeout to the activation server to the value supplied), RLM_QUEUE (enables queueing for a license), and RLM_ROAM (controls setting up, using, and returning roamed licenses).  This is not an exhaustive list, but gives you an idea of what environment variables can do.  In some situations, a Reprise Software support person may ask you to set a particular environment variable to some value and then run your application.  This article is about how to set environment variables, not which ones are available in RLM.

A characteristic of environment variables is that they are set in a process, like a Windows command window or a Unix/Linux shell, and are inherited by processes that are created by that process.  So if you create 2 command windows and you set an environment variable in window 1, it won’t be set in window 2.  But if you run an application in window 1, the environment variable will be set in that application.

The easiest way to use an environment variable with RLM is to set it in a command window or shell, then invoke the application from that window or shell.  For example, if you wanted to set RLM_DIAGNOSTICS to cause the application to write RLM diagnostic information to the file “diag.txt”

  • Windows: set RLM_DIAGNOSTICS=diag.txt
  • sh, bash : export RLM_DIAGNOSTICS=diag.txt
  • csh: setenv RLM_DIAGNOSTICS diag.txt

Then invoke the application from the window where you set RLM_ROAM.
But it’s inconvenient or sometimes impossible to invoke the application from a command window on Windows.  In that case you can set the environment variable via the Windows control panel:

  • Bring up the control panel.
  • Search for “environment” in the search box at the top right.
  • Click on “Edit environment variables for your account.
  • Enter the environment variable name and value.
  • Click on OK in both windows.

Leave a Reply

Your email address will not be published. Required fields are marked *