Using environment variables

The GetEnvironmentValue, GetEnvironmentString, and SetEnvironmentVar methods retrieve and set environment variables, which are stored in the local notes.ini or Preferences file. Use GetEnvironmentValue only for numeric environment variables. Use GetEnvironmentString for strings and numeric values.

SetEnvironmentVar prepends a dollar sign ($) to parameter 1, the name of the environment variable, if the third parameter is false or omitted. The dollar sign distinguishes user environment variables (name starts with a dollar sign) and system environment variables (name does not start with a dollar sign). GetEnvironmentValue and GetEnvironmentString prepend a dollar sign if the second parameter is false or omitted, and do not prepend a dollar sign if the second parameter is true.

Environment variables are useful for saving state and data between sessions on a single server or workstation where no conflicts are possible. They are also useful for obtaining the environment information set by Domino® Designer, such as KitType, Directory, Preferences, Domain, Port, and so on.