Get Environment Variable
Returns the value of the given environment variable.
Privileges
Normal
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
Variable |
String |
Yes |
The name of the environment variable to return. |
Type |
String |
Yes |
The type of variable as either User, or Machine (System), or Process. For devices using Windows operating systems, the Type of environment variable falls into one of three categories:
|
Output Parameters
Name | Type | Description |
---|---|---|
Result | Number | Returns a success value of zero or any value other than zero to indicate failure. |
Value | String | The value of the environment variable. |
Example Input Parameters
Name | Type | Required | Example |
---|---|---|---|
Variable |
String |
Yes |
ALLUSERSPROFILE APPDATA CAARCFLASH_HOME CommonProgramFiles CommonProgramFiles(x86) CommonProgramW6432 COMPUTERNAME ComSpec FP_NO_HOST_CHECK LOCALAPPDATA NUMBER_OF_PROCESSORS OS Path PATHEXT PROCESSOR_ARCHITECTURE PROCESSOR_ARCHITEW6432 PROCESSOR_IDENTIFIER PROCESSOR_LEVEL PROCESSOR_REVISION ProgramData ProgramFiles ProgramFiles(x86) ProgramW6432 PSModulePath PUBLIC SystemDrive SystemRoot TEMP TMP USERDOMAIN USERNAME USERPROFILE Windir Environment variables will differ depending on OS and installed applications |
Type |
String |
Yes |
Process |