Name
environment variable
Synopsis
Add, delete, and set environment variables.
Procedures
Environment variables are created, deleted, and configured using the System utility in the Control Panel (see System for more information). You can also right-click on the root node of the Computer Management console to display or modify the environment variables for the computer to which the console is currently connected.
Add or Delete an Environment Variable
Start → Settings → Control Panel → System → Advanced → Environment Variables → {New | Delete}
Set an Environment Variable
To set (modify the value of ) an environment variable from the GUI, you can use System in the Control Panel:
System → Advanced → Environment Variables → select a variable → Edit → specify value |
You can also rename variables this way, but you should exercise caution as renaming system variables could cause boot failures.
To set a variable from the command line, use the
set
command (see Chapter 7).
Notes
Only a member of the Administrators group can add, delete, or set the value of a system environment variable.
Changes made by the currently logged-on user only affect the user environment variables for that user.
You may have to reboot your system or close and reopen your application for the new value of an environment variable to take effect.
Use the
setlocal
andendlocal
commands to set environment variables that are local to a particular batch file.
See Also
Get Windows 2000 Administration in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.