SetEnvironment
SetEnvironment["var"value]
sets the value of an operating system environment variable.
SetEnvironment[{"var"value,…}]
sets values for several environment variables.
Details
- An environment variable defined in the current session is accessible within this session or in the child processes spawned by the Wolfram System, for example, when using Run or CreateLibrary.
- Values of environment variables, or merely their existence in the environment, may affect the behavior of certain Wolfram Language functions or child processes.
- The value or the existence of a defined variable is not preserved when the Wolfram System is terminated or restarted.
- If the variable "var" did not exist in the environment, its name is added to the environment with the associated "value".
- If the variable "var" already existed in the environment, its value is replaced with "value".
- Setting "var"->None removes the variable and its definition from the environment. If "var" did not previously exist, it will not be created.
- Setting "var"->"" does not remove the variable from the environment, but merely sets its value. If "var" did not previously exist, it will be created.
Examples
Wolfram Research (2012), SetEnvironment, Wolfram Language function, https://reference.wolfram.com/language/ref/SetEnvironment.html.
Text
Wolfram Research (2012), SetEnvironment, Wolfram Language function, https://reference.wolfram.com/language/ref/SetEnvironment.html.
CMS
Wolfram Language. 2012. "SetEnvironment." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SetEnvironment.html.
APA
Wolfram Language. (2012). SetEnvironment. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SetEnvironment.html