# AG\_GETENV
> [HTML Version](ag_getenv.htm)
_Reviewed and revised December 2023_
**tab(-10, AG\_GETENV); var \{,demangle\}; chr(127);** [Tab(-10,x) Syntax Notes](ag_xxx_syntax-notes.htm.md)
AG\_GETENV (45) will return (in the keyboard buffer) the definition of the specified environment variable as defined to the ATE client (or A-Shell/Windows).
This function has both a [subroutine and a print tab implementation](subroutine-print-pairs.htm.md).
In addition to real environment variables, this command also recognizes three pseudo-environment variables only understood by the A-Shell/Windows or ATE client:
• ATEEXE: the full filespec of the client executable, e.g. "c:\\ATE\\bin\\ashw32.exe"
• ATEVER: the version string for the client executable, e.g. "7.0.1753.2"
• ATELICMODE: a decimal value containing flags indicating how the client was licensed (see [ATELICMODE](atelicmode.htm.md) for details)
**Parameters**
_var_
the name of an environment variable whose value you want to check
_demangle_
if set to "1", if the variable is in the ancient DOS 8.3 compressed format, demangle it to the full long format, if possible.
**Response**
The value of the specified environment variable, or "" if not defined.
**Examples:**
map1 envval\$,s,0
? tab(-10, AG\_GETENV); "TEMP"; chr(127);
input "",envval\$
In some very old versions of Windows, the response might look something like this:
C:\\DOCUME~1\\yourname\\LOCALS~1\\Temp
To demangle it, add the ",1" ...
? tab(-10, AG\_GETENV); "TEMP,1"; chr(127);
input "",envval\$
... to get a response more like:
C:\\DOCUMENTS AND SETTINGS\\yourname\\LOCAL SETTINGS\\Temp>
**See Also**
• [MX\_GETENV](mx_getenv.htm.md)[xs](keyword-types.htm.md) for retrieving an environment variable from the application server—as opposed to client—machine.
• GETENV.LIT