How to Set Environment Variables in Windows 10
Windows 10 has been on the market since 2015, but the Windows OS family has a much longer history. In fact, Windows happens to be one of the oldest operating systems still in use today, thanks to Microsoft’s domination of the PC market in the 1990s. Along the way, specific versions of Windows did very well, particularly Windows XP, Windows 7, and of course, Windows 10. The popularity has kept the OS alive even as the computing world has changed radically, and the age of the lineage means that the operating system has a wealth of legacy features that the most modern versions still support.
One of those legacy features, and one that is still in use today (and a useful feature it is, too) is the environment variable. Environment variables have been a powerful feature of Windows from the earliest days; in fact, they predate Windows and derive from MS-DOS. Despite their age, environment variables are a useful way to control the way Windows operates with an extremely small footprint in terms of memory usage. For example, one common environment variable is called PATH, which is simply an ordered text string containing a list of directories that Windows should look in when an executable file is invoked. This allows users to quickly launch utility programs or other programs without having to know (or care) where those programs live on the hard drive. Setting environment variables is very simple. In this article, I will provide you with information on how to find and set your environment variables.
How Do I Create Environment Variables in Windows?
Once logged in to Windows, you need to right-click the corner button (the little Windows icon) in the lower left corner of the screen.
This should open the Power User Task Menu. Depending on your settings, it may open the Start menu instead. If it opens the Start menu, then type Windows-x on your keyboard instead to open the Power User Task Menu.
Click “System” from the Power User Task Menu displaying on screen.
Under the “System” menu, you need to find “Advanced System Settings”. Click on the “Advanced System Settings” link in the left column under “System”. If it does not appear there, then type “advanced system settings” into the search box and hit return and it will come up.
Once the Advanced System Settings are open, click on the “Advanced Tab” followed by the “Environment Variables” option you will find on the bottom right side.
To create a new environment variable, just click the “New” button.
A dialog will pop up allowing you to enter a new variable name, and to set its initial value.
Under the environment variables window, choose or highlight the “PATH” variable in the “System Variables” section shown on window.
How Do I Find Environment Variables in Windows?
You can either go through the procedure described above to find the environment variable information tucked away inside the system advanced settings. However, if you just need to see what the variables are but don’t need to change them, you can simply open a command line interface by hitting Ctrl-Esc and typing “cmd” in the command box, then type “set” in the command window. This prints out all the environment variables that are set on your system.
Are you interested in getting even more out of Windows 10? Learn how to create macros in Windows 10 with this handy article.
Setting Environment Variables in Windows 10
Follow the process above to get into the environment variables dialog box. After highlighting PATH variable from “System Variables” click the Edit button. You can add or modify the path lines with the directories you want your computer to look in for executable files. You will find that each different directory is separated with a semicolon, for example:
There are other environment variables “System Variables” section which you can examine by clicking Edit. Likewise, there are different environment variables, such as PATH, HOME and USER PROFILE, HOME and APP DATA, TERM, PS1, MAIL and TEMP etc. These variables are very useful and can be used in scripts as well as on the command line.
Interested in digging into the guts of Windows 10? Check out the Windows 10 In Depth Guide, a comprehensive book that will turn you into a Windows 10 powerhouse!
For more information about using the command line, check out this TechJunkie tutorial.