Does Windows Add environment variables need to be restarted

Source: Internet
Author: User

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?

When a program starts, the environment variable is copied to the environment where the program is located, and is not changed by programs other than the 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.

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).

Does Windows Add environment variables need to be restarted

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.