version 2004.1 (Modified)
SET ENVIRONMENT VARIABLE (varName; varValue)
Parameter | Type | Description | |
varName | String | Variable name to set | |
varValue | String | Value of the variable or | |
"" to reset default value |
Description
The SET ENVIRONMENT VARIABLE command allows you to set the value of an environment variable under Mac OS X and Windows. It is meant to be used with the SET CGI EXECUTABLE or LAUNCH EXTERNAL PROCESS commands.
Pass the name of the variable to define in varName and its value in varValue.
To get the general list of environment variables and possible values, please refer to the technical documentation of your operating system.
To see the list of environment variables available with the SET CGI EXECUTABLE command, please refer to the Using CGIs section in the "Web Server" chapter.
To see the list of environment variables available with the LAUNCH EXTERNAL PROCESS command, please refer to the documentation for this command. Note that two specific environment variables are available for use in this context:
_4D_OPTION_CURRENT_DIRECTORY: Used to set the current directory of the external process to be launched. In varValue, you must pass the pathname of the directory (HFS type syntax on Mac OS and DOS on Windows).
_4D_OPTION_HIDE_CONSOLE (Windows only): Used to hide the window of the DOS console. You should pass "true" in varValue to hide the console or "false" to display it.
These variables are valid in the current process for the next call to LAUNCH EXTERNAL PROCESS.
Example
Refer to examples 7 and 8 of the LAUNCH EXTERNAL PROCESS command.
See Also
LAUNCH EXTERNAL PROCESS, SET CGI EXECUTABLE, Using CGIs.