When you open one of the build environments, a batch file named setenv.bat executes in this window. This sets the environment variables to their default values for this environment.
In most cases, it is not necessary for you to directly invoke the setenv.bat file. However, you may find this useful when writing scripts that will execute several sequential builds.
The command-line syntax is as follows:
setenv Directory [fre|chk] [64|AMD64] [hal] [W2K|WXP|WNET] setenv Directory -?
All parameters except for Directory are case-sensitive.
If you open a new Command Prompt window and execute
setenv D:\ddk chk 64 WXP
it will set up a 64-bit Windows XP checked build environment, as long as D:\ddk is indeed your DDK installation directory.
If you are going to write a script that will automatically launch the build utility, you should not run setenv.bat twice in the same Command Prompt window. Although setenv.bat will set all the environment variables needed for any given build environment, it may not delete the environment variables set by a previous use of this command.
Therefore, if you plan to run sequential builds of different types from a batch file, you should use a format along these lines:
cmd setenv b:\ddk chk 64 WXP exit cmd setenv b:\ddk fre 64 WNET exit