Using the command prompt to change environment variables

You can change the setting of an environment variable at a command prompt.

About this task

The following diagram shows the syntax for setting an environment variable at a command prompt in Windows.

1  set ABCD = value

If no value is specified, the environment variable is unset, as if it did not exist.

To view your current settings after one or more HCL Informix® products are installed, enter the following command at the command prompt.

1  set

Sometimes you must add information to an environment variable that is already set. For example, the PATH environment variable is always set in Windows environments. When you use HCL Informix® products, you must add the name of the directory where the executable files for the HCL Informix® products are stored to the PATH.

In the following example, INFORMIXDIR is d:\informix (that is, during installation, HCL Informix® products were installed in the d: \informix directory). The executable files are in the bin subdirectory, d:\informix\bin. To add this directory at the beginning of the PATH environment-variable value, use the following command:
set PATH=d:\informix\bin;%PATH%
Rather than entering an explicit pathname, you can use the value of the INFORMIXDIR environment variable (represented as %INFORMIXDIR%), as the following example shows:
set INFORMIXDIR=d:\informix
set PATH=%PATH%

You might prefer to use this version to ensure that your PATH entry does not contradict the search path that was set in INFORMIXDIR and to avoid the requirement to reset PATH whenever you change INFORMIXDIR.

For more information about setting and modifying environment variables, see your operating-system publications.