Windows 10 allows you to change or add custom environment variables. Here are the steps to add an environment variable in Windows 10.
Environment Variables in Windows
Windows has a number of different built-in environment variables for opening folders, folders, and running processes. Some of the built-in variables include TEMP, userprofile, windir, prefetch , and so on. In fact, Windows even creates some custom environment variables for its own applications. For example, to open the OneDrive folder, you can simply execute the “OneDrive” command in the Run window . This happened because OneDrive created a new environment variable in the background.
If you have a directory or process that you want to open with a dynamic value, you can add an environment variable for that value. For example, you have a custom variable to open the Downloads folder . This makes it easy to access the folder in custom scripts and other applications. You don’t have to worry about the actual directory location as long as it is properly configured in the environment variable.
In this quick and simple guide, make TechReprint.com will show you the steps to add an environment variable in Windows 10.
Steps to add an environment variable in Windows 10
To add a new environment variable, follow the steps listed below.
1. Open the Start menu by pressing the Windows key .
2. Type Environment variables and click the result Edit the system environment variables .
3. Click the Environment variables button in the Advanced tab .
4. You can create User Variable or System Variable .
- User variable : Only available to that specific user.
- System variable : Available to all users including system programs.
5. To create a user variable, click New in the User Variables section .
6. To create a system variable, click New in the System Variables section .
7. Now enter the variable name in the first field. Make sure the name has no spaces or special characters.
8. Next, enter the variable value in the second field. For example, to open a folder, you must enter its path in the Value field .
9. Click OK to add an environment variable.
10. Click OK in the environment variables window.
11. In the main window, click the Apply> OK button.
12. Restart Windows 10 to apply the new environment variable.
From now on, you can use the custom variable from the Command Prompt window or the Run window . To use an environment variable add “%” to the beginning and end of the variable name. For example, if you want to open your Downloads folder, issue the command “% download%”. If you don’t add the “%” sign, Windows won’t recognize the variable value.