Win7 system environment variable path two settings method

  

An environment variable is an object with a specific name in the operating system that contains information that will be used by one or more applications. For example, the path environment variable in Windows and DOS operating systems, when the system is required to run a program without telling the full path of the program, the system should look for the program in the path, in addition to the path specified in the path. . Users can run processes better by setting environment variables. Know what the environment variable is? Then how to set the environment variable path in the win7 system?

There are two ways to set the environment variable: the first one is set in the command prompt run window; The two are set by clicking on the "My Computer & Rarr; Properties & Rarr; Advanced" tab's "Environment Variables" button setting. It should be noted that the first way to set environment variables is only valid for the current running window. After closing the running window, the setting will not work, and the second way to set environment variables is permanent. As shown in Figure 1
Figure 1 Environment Variables

First: Set the environment variable in the Command Prompt window?

1. At “Start →Run” Enter “cmd” in the box and press the “OK" button to display the command run window. Enter “path” at the command prompt to view the environment variable settings. As shown in Figure 2
Figure 2 path command

How to change the setting of an environment variable? There are two cases to change the environment variable:

One is the append mode, that is, it does not change In the case where the environment variable is currently set, increase the value of the variable. For example, to add a value of "D:/Python" to the environment variable, enter "ldpath;path=%path%;D:/Python”".

The other is a complete modification method. For this method, we can implement it by directly creating an environment variable.

Second: modify environment variables under win7 PATH

windows system environment variable description

%USERPROFILE% means C:DocumentsandSettings current user name

% ALLUSERSPROFILE% means C:DocumentsandSettingsAllUsers

%APPDATA% means C:DocumentsandSettings current user name ApplicationData

%ALLAPPDATA% means C:DocumentsandSettingsAllUsersApplicationData

%SYSTEMDRIVE% means C:

%HOMEDRIVE% means C:

%SYSTEMROOT% means C:WINDOWS

%WINDIR% means C:WINDOWS

%TEMP% and %TMP% C:DocumentsandSettings current user name LocalSettingsTemp

%ProgramFiles% means C:ProgramFiles

%CommonProgramFiles% means C:ProgramFilesCommonFiles

The environment variable setting method is introduced here, hope It is helpful for users who have needs in this area.

Copyright © Windows knowledge All Rights Reserved