HOST_GetEnv Function


Returns the value of an environment variable on the host machine.


sValue = HOST_GetEnv(sVar)
Variable Description
sValue The value of the variable. STRING.
sVar The environment variable to check. STRING.


HOST_GetEnv returns the value of the specified environment variable. The function returns an empty string ("") if the value is not defined. Unlike SYS_GetEnv, HOST_GetEnv executes in Silk Test Classic rather than in the Agent. If used in code, HOST_GetEnv is recognized by the compiler and so is seen as a constant rather than a function call. You may find it useful to access environment variables as compiler constants and in use statements.


use "{HOST_GetEnv ("HOME")}\"