You
can see a list of these environment variables on the Microsoft Web site at http://www.microsoft
.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview
.mspx. Typing Set by itself and pressing Enter displays the list of environment variables set for your
machine as shown in Figure 5.2. This list doesn??™t include the hard-coded environment variables
such as CD.
You can use the /A command line switch to combine existing environmental variables or even
perform math with them. For example, you could use the following Set command to create a new
environment variable based on the existing %NUMBER_OF_PROCESSORS% environment variable.
SET /A TwiceTheProcessor=%NUMBER_OF_PROCESSORS% * 2
Figure 5.2
The Set command
displays the list of
environment variables
defined for
your machine.
STARTING THE COMMAND INTERPRETER 123
You can use any of the operators shown in Table 5.4 when creating your expression. The operators
appear in order of precedence.
Any expressions you create can also contain octal, decimal, or hexadecimal numbers. All octal
values begin with a 0 (zero) and hexadecimal values begin with a 0x. The Set command is quite
handy when you create batch files, so you??™ll see additional coverage for it in the ???Creating Batch
Files??? section.
Pages:
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339