- System environment variables
- User environment variables
- AUTOEXEC.BAT environment variables
- How environment variables are set
- How the path is built
- Changing user environment variables by using Control Panel
System environment variablesSystem environment variables can be viewed from Control Panel by choosing the System icon. These variables are always set no matter who logs on and they cannot be changed by any user.
There are a few additional predefined environment variables that are set when the user logs on that do not appear in the System dialog box:
NTVERSION (not available in Windows NT 4.0 anymore)
HOMESHARE=\\<server name>\<share name> HOMEPATH=\<path> HOMEDRIVE=<drive letter>:
HOMEDRIVE=c: HOMESHARE= HOMEPATH=\nt
All above environment variables are always present and therefore may be used in log on scripts.
User environment variablesUser environment variables can be viewed from Control Panel as well. The user may add, delete or modify the environment variables in the User Environment Variables for User field. These variables take precedence over system environment variables. The user path is appended to the system path.
AUTOEXEC.BAT environment variablesAll environment variables and the paths set in the AUTOEXEC.BAT file are used to create the Windows NT environment. Any paths in the AUTOEXEC.BAT file are append to the system path.
How environment variables are setEnvironment variables are set in the following order:
- System variables
- AUTOEXEC.BAT variables
- User variables
How the path is builtThe Path is constructed from the system path, which can be viewed in the System Environment Variables field in the System dialog box. The User path is appended to the system path. Then the path from the AUTOEXEC.BAT file is appended.
Note: The environment variables LibPath and Os2LibPath are built the same way (system path + user path + AUTOEXEC.BAT path).
Changing user environment variables by using Control PanelUser environment variables can be added, changed or deleted from Control Panel. There is no need to reboot after making any of these changes. Changes take effect immediately after exiting the System dialog box.
The next application you start will use the new settings. All other applications running before the changes were made will not recognize the changes.
문서 ID: 100843 - 마지막 검토: 2007. 2. 19. - 수정: 1