How do I set Windows Environment variables permane

2020-02-06 07:44发布

How do I set Windows Environment variables permanently, I see that the Windows environment variables are reset when you close the command window. I want to set them permanently so that I don't have to repeat the task every time I use CLI.

2条回答
欢心
2楼-- · 2020-02-06 07:50

This can also be achieved from command prompt. The following example set a variable at user level:

SETX variable_name value

For machine level elevation is required:

SETX variable_name value /m
查看更多
闹够了就滚
3楼-- · 2020-02-06 08:01

Right click on Computer, Advanced system settings, select Advanced tab and click Environment variables.

Note: once you modify the environment variables, you will have to restart your applications, including CLI.

查看更多
登录 后发表回答