Environment

Environment["var"]

gives the value of an operating system environment variable.

Details

  • The values of environment variables are returned by Environment as strings.
  • Environment returns $Failed if it cannot find a value for the operating system variable you requested.
  • The behavior of Environment depends on the computer system you are using.

Examples

Basic Examples  (1)

In[1]:=
Click for copyable input
Out[1]=

See Also

GetEnvironment  SetEnvironment  ProcessEnvironment  Run  $CommandLine  $System  SystemInformation

Tutorials

Introduced in 1988
(1.0)