Any user working with the command prompt or batch scripts will be well aware of environment variables due to the repetition of values. Every environment variable has two parameters: name and value. Therefore, you can edit or create your own environment variables to make your work easier. In this guide, I will discuss the ways to edit environment variables in Windows 10.
Editing Environment Variables.
In order to edit environment variables, follow the steps below to access them. Navigating to Environment Variables Using the Command Prompt:
- If you want to have access to both the variables, i.e., user and system variables, then open an elevated Command Prompt by right-clicking on the Start Menu icon and selecting Command Prompt (Admin) from the list.
- While inside the command prompt, type or copy/paste the following command provided below. You can paste the command by right-clicking inside the Command Prompt and selecting ‘Paste.’ Press the Enter key to execute the command.
Command: rundll32.exe sysdm.cpl,EditEnvironmentVariables 3. After pressing Enter, the Environment Variables window will pop up, featuring a section for User Variables and another for System Variables.
To edit a variable, select the desired variable and press the Edit button to change its name. After making adjustments, press OK.
If you want to create a new environment variable for yourself, then click on the “New” button, and type the name and value for that particular variable, followed by clicking “OK.
Navigating to Environment Variables Manually.
Press the Win + X keys on the keyboard and select ‘System’ from the list.
Inside the System window, click on Advanced System Settings located in the left pane.
Within the advanced system settings, click on the Environment Variables button at the bottom, and follow the same procedure to edit environment variables as described above.





