EnvGet()

Auto Hotkey

EnvGet

Retrieves an environment variable.

OutputVar := EnvGet("EnvVarName")
Function Example: tmp := EnvGet("Temp")

Parameters

OutputVar

The name of the variable in which to store the string.

EnvVarName

The name of the environment variable to retrieve. For example: EnvGet, OutputVar, Path.

Remarks

If the specified environment variable is empty or does not exist, OutputVar is made blank.

The operating system limits each environment variable to 32 KB of text.

This command exists because normal script variables are not stored in the environment. This is because performance would be worse and also because the OS limits environment variables to 32 KB.

Related

EnvSet, environment variables, EnvUpdate, Run, RunWait

Example

EnvGet, OutputVar, LogonServer