How to enable environment variables without restarting the computer

Source: Internet
Author: User

From: http://blog.goods-pro.com/146/%E8% AE %A9%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E7%94%9F%E6%95%88%E4%B8%8D%E9%9C%80%E9%87%8D%E5%90%AFwindows/

 

First, go to my computer> Properties> advanced> environment variables, add new environment variables or modify existing environment variables, and then run "doscommand prompt" or run cmd. If you want to modify the PATH variable, no matter what the original value of path is, change the path to any value in the DOS window and close the DOS window, my computer> Properties> advanced> environment variable path has taken effect globally in windows.

Do not worry that changes in the DOS window will affect my computer> Properties> advanced> environment variables. The environment variables in the DOS window are only a copy of the Windows environment variables, changes to the copy will not affect the original, but will trigger the refresh of the original, which is exactly what I want-to make the environment variable take effect

 

Note:

Do not know how to modify environment variables in DOS? It is very simple. For example, to modify the path, "set Path = c: \", there should be no spaces on both sides of the equal sign. PATH environment variables are the most commonly used. Specifically, there is a doscommand path used to view and modify the PATH value. Here we will not expand the path syntax.

Want to verify whether the environment variable has taken effect? Very simple. Open a new DOS window, for example, to view the PATH value, "Echo % PATH % ". Similarly, you can use the path command to view the path.

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.