Click on the "My Computer → properties → advanced" tab of the "Environment variables" button, the "Environment Variables" dialog box, if the administrator is currently logged on to the System Users, dialog box above the administrator's user variable, The following dialog box is the system variable (that is, the user variable that corresponds to all users in the system). Sometimes we see that there is an environment variable in both the user variable and the system variable, such as path, then the value of the path is the value in the user variable or the value in the system variable, or neither. The answer is neither. The value of the path variable is the superposition of the value in the user variable with the value in the system variable.
System environment variables that work for all users, and user environment variables only work for the current user.
For example, if you want to use Java, then you add the Java Bin directory to the PATH variable below (adding method), then it is the system environment variable, all users log in, the command line Java will have Java help information out. And if you create a variable below a user's variable, it is only useful to the user, and when you log on to another user, the variable is not there.
System variables: Related to the Windows operating system, including network conditions, defined by the operating system. Users of the Administrators group can add, modify, or delete.
User variables: Created by the operating system, certain applications, and users, such as the Windows XP Installer, which sets the default storage location for the temporary folder and treats it as a user variable. Any user can add, modify, or delete.
These variables are created by Windows XP installer, some applications, and users. These changes are written to the registry and usually take effect immediately. However, after you change the user environment variable, you should restart all open soft
program so that it reads the new registry value.
A common reason to add and change variables is to provide the data you want to use in a program (script). See below for examples of applications.
System variables: Related to the Windows operating system, including network conditions, defined by the operating system. Users of the Administrators group can add, modify, or delete.
User variables: Created by the operating system, certain applications, and users, such as the Windows XP Installer, which sets the default storage location for the temporary folder and treats it as a user variable. Any user can add, modify, or delete.
A list of Windows system environment variables:
%allusersprofile% |
Lists all user profile locations. |
%appdata% |
Lists the default storage locations for application data. |
%cd% |
Lists the current directory. |
%clientname% |
Lists the NetBIOS names of clients that are joined to a Terminal Services session. |
%cmdcmdline% |
Lists the command lines that are used to start the current Cmd.exe. |
%cmdextversion% |
Command the current command handler extended version number. |
%commonprogramfiles% |
Lists the folder paths for commonly used files. |
%computername% |
Lists the computer names. |
%comspec% |
Lists the path to the executable command shell (command handler). |
%date% |
Lists the current date. |
%errorlevel% |
Lists the error codes for the most recently used commands. |
|