Two methods of setting win7 system environment variable path
Environment variable PathAn environment variable is an object with a specific name in the operating system that contains the information that one or more applications will use. For example, the PATH environment variable in Windows and DOS operating system, when the system is required to run a program without telling it the full path of the program, in addition to the current directory in the search for this program, but also in path specified in the path to find. The user can run the process better by setting the environment variables. The environment variable in the Win7 system how to set the path?
There are two ways to set environment variables: The first is to run the window at the command prompt, and the second is set by clicking the Environment Variables button on the My Computer → properties → advanced tab. It is important to note that the first way to set the environment variable is only valid for the current running window, when the Run window is closed, the setting does not work, and the second way to set the environment variable is permanent. 1 is shown
Figure 1 Bad environment variables
1, enter "cmd" in the "Start → run" box and press "OK" button, the command Run window appears. Enter "path" at the command prompt to view environment variable settings. 2 is shown
Figure 2 Path command
How do I change the settings of an environment variable? There are two scenarios for changing an environment variable:
The first is the Append method, that is, without changing the existing settings of the environment variables, increase the value of the variable, for example, to add a value to the environment variable "D:/python" setting, you can enter "path=%path%;D:/python".
The other is a completely modified way, for this way, we can adopt the method of directly creating an environment variable to implement.
Description of the Windows System environment variables
%userprofile% represents c:documentsandsettings Current user name
%allusersprofile% says C:documentsandsettingsallusers
%appdata% represents c:documentsandsettings Current user name ApplicationData
%allappdata% says C:documentsandsettingsallusersapplicationdata
%systemdrive% = c:
%homedrive% = c:
%systemroot% says C:windows
%windir% says C:windows
%temp% and%tmp% represent c:documentsandsettings current user name Localsettingstemp
%programfiles% says C:programfiles
%commonprogramfiles% says C:programfilescommonfiles
Windows Path Settings