"Go" windows7 Modify environment variables and discuss without restarting the computer

Source: Internet
Author: User

Original: http://www.cnblogs.com/zhenmingliu/archive/2013/02/21/2921396.html

Go to My Computer > Properties > Advanced > Environment variables, add a new environment variable or modify an existing environment variable, and then run "DOS command Prompt" or run cmd, assuming you want to modify the path variable, regardless of the original value of path, In the DOS window directly change path to any value, close the DOS window, at this time, My Computer > Properties > Advanced > Environment variable path is already in Windows global effect.

Do not worry about the changes in the DOS window will affect my Computer > properties > Advanced > Environment variable changes, DOS window environment variable is only a copy of the Windows environment variables, copy changes will not affect the original, but will trigger the original refresh, this is what I want-- Let the environment variable take effect.

Note:

1, do not understand the DOS under the change environment variables? Very simple, if you want to modify PATH, "SET path=c:\", there is no space on either side of the equal sign. The PATH environment variable is most commonly used, specifically with a DOS command path, which is used to view and modify the path value, and does not expand the syntax of the path.

2, want to verify that the environment variables in the end have no effect? Very simple, open a new DOS window, if you want to see the PATH value, "ECHO%PATH%". As above, path can also be viewed with the path command.

Often see some software installation instructions that say, modify the environment variables for Windows, and then restart the computer. This begs the question, do you really want to restart after modifying the environment variable? In fact, as long as the understanding of the principle of environmental variables can make the right judgment. Environment variables are system variables that are valid for any program that runs. The simplest method of confirmation is the Cmd.exe program. Click Start, Run, and enter CMD, enter the set in the command-line window that starts, and then you can see a whole bunch of different environment variables appearing on the screen. Modifying environment variables is done through the Environment Variables dialog box, System, control Panel, and so on. The understanding here is that when a program starts, the environment variable is copied to the environment where the program is located, and it is not changed by programs other than that program during the execution of the program. That is, suppose we start a cmd program and then modify the environment variable settings through the Control Panel, but the environment variables owned by the CMD that have been started are not changed. If we start the CMD program after modifying the environment variable, the program will have the new environment variable. So the conclusion is obvious: after modifying an environment variable, if the application is affected, the modification of the environment variable will be reflected in the program without restarting the computer if it is simply restarted, but if the system service is affected, A reboot is required to reflect the modification of the environment variable to the system service (because there is no way to restart the system Service Manager without restarting the computer).

"Go" windows7 Modify environment variables and discuss without restarting the computer

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.