Admittedly, someone working at the command line is more likely to see the effects of environment
variables directly. For example, without a proper path environment variable, you can??™t execute
many applications. The path points to the locations where the command processor should look for
applications.
Windows supports two forms of environment variables: permanent and session. The session
environment variables only affect the current command line session. As soon as you close the command
window, these environment variables are gone. You create session environment variables
using the Set command. Permanent environment variables exist for all Windows GUI applications
as well as the command prompt. Unless you change them, permanent environment variables exist
between reboots of your system as well. You set permanent environment variables using the WMIC
Environment alias (see Chapter 3 for details on the WMIC command). For example, if you want to set
the permanent path variable to include the C:\Temp directory, you would type WMIC Environment
Where Name="Path" SET VariableValue="C:\Temp;%PATH%" and press Enter. Notice that you
include the %PATH% expansion variable to preserve the existing path information.
Pages:
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335