The INIT environment variable tells PWB where to find the TOOLS.INI file and where to store the CURRENT.STS file. The proper setting of these variables—INIT, TMP, LIB, INCLUDE, HELPFILES, and PATH—governs whether your development environment works smoothly.
·To set the INIT environment variable from the command line:
Type SET INIT=C:\INIT
The operating-system SET command sets the environment variable to contain the string C:\INIT. This example presumes that you want to store your initialization files in C:\INIT. You could use any other directory. Make sure that the INIT environment variable lists a single directory. Multiple directories in INIT can cause inconsistent behavior.
The following list outlines how the environment works:
The environment is always inherited from the parent process. The parent is the process that starts the current process. In DOS, the parent is often COMMAND.COM or Windows.
Inheritance of environment variables is a one-way process. A child inherits from its parent. You can make changes to the environment in a child (when you use the Environment Variables command in PWB, for example), but they are not passed back to the parent. This means that any changes to environment variables that you make while shelled out are lost when you return to PWB.
Each DOS session under Windows inherits its environment from Windows. Changes made to the environment in one session do not affect any other session.
The best way to make sure your environment is set properly is to explicitly set it in one of your startup files. These are:
CONFIG.SYS
AUTOEXEC.BAT
By default, PWB saves the complete table of environment variables for each project. You can use the Environment Variables command from the Options menu to change environment variables for individual projects.
If you prefer that PWB save the environment variables for all PWB sessions or use the current operating-system environment when it starts up, change the Envcursave and Envprojsave switches. For more information on these switches, see the “Programmer's WorkBench Reference” on pages 279 and 280.