sysGetEnv

Retrieves the value of an environment variable. Takes name (environment variable name). Returns the value of the specified environment variable from the current process environment.

System

Parameters & Returns

Parameters

name String

Returns

String

Quick Summary

Retrieves the value of an environment variable. Takes name (environment variable name). Returns the value of the specified environment variable from the current process environment.

Technical Exegesis...

Gets the value of the specified environment variable from the current process environment. Returns an empty string if name is NULL, if the variable doesn't exist, or if the value exceeds the buffer size (32767 bytes, the maximum Windows environment variable size).

Uses GetEnvironmentVariableA to retrieve the variable value. Common environment variables include PATH, TEMP, USERNAME, USERPROFILE, etc. Useful for reading system configuration and user information.

Example

Example.bam
; No example implemented yet