Windows System Environment variables

Source: Internet
Author: User

User variables and System variables

User variables are valid only for the current user, and system variables are valid for all users. When you retrieve a command, the system variable is in front of the user variable. In other words, if two places contain the same command, the system variable is prioritized to indicate the command under the path.

Set path =%path%;D: \java is valid only for the current command-line window.

Modify Windows environment variables to take effect without restarting

After setting the environment variable in My computer's properties, click OK to view the environment variable in cmd through the path command, sometimes it is not in effect and will not appear in path. The reason is that

Workaround: To modify the PATH variable as an example, in the advanced settings, after the modification, into the win+r->cmd boot DOS command prompt, set path=c, and other commands to set the environment variables can be, close the DOS window, open the DOS window again, enter PATH, Look at the environment variables, and you can tell that the path value in the environment variable, properties-----, my computer, is already in effect.

Workaround: Modify the environment variables in the DOS window, just modify a copy of the system environment variables, and do not affect each other. However, modifications to the copy cause a refresh of the Windows environment variables, which is exactly what we want. It is further explained that when a program is started, the environment variable is copied to the environment where the program is located, and will not be changed by programs other than the program during the execution of the program. That is, if we start a CMD program, then the control Panel modifies the environment variable settings, the CMD has the environment variables will not be changed, at this time, restart a CMD program, the program's environment variables will be changed.

Conclusion: Modify the environment variables, if the application is affected, then only need to restart the program to take effect. If the system service is affected, you must restart your computer to reflect the changes to the environment variables in the system service.

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.