How do I set Windows Environment variables permanently?
14,830
Solution 1
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.
Solution 2
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
Related videos on Youtube
Author by
CleanX
Updated on September 15, 2022Comments
-
CleanX about 1 year
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.
-
amalgamate almost 8 yearsFor windows 8 users: Typing "Control Panel\All Control Panel Items\System" in the file explorer exposes the "Advance System Settings" link.
-
Gary Klasen almost 3 yearsIf you use this for updating %PATH%, this will cut it down to 1024 chars and potentially delete every path behind that range. So take care when using.