How to set up and change the PATH system variable?
- September 10, 2020
- Posted by: Ilhan Koral
- Category: Setup Environment
This method is easy to follow and apply, moreover many steps are the same for Win 8 as Win 10. Unfortunately, if you don’t have admin rights or given specific permission you can not follow this method.
1. Click search button, search for “Control Panel” and click Control Panel.
2. In the Control Panel find System and open it. Then click Advanced system settings.
3. Select Advanced Tab and go to Environmental Variables
By the way, in the new Win 10 version, if you write “Environment” to the search box, you can directly see the “edit environment variables option” and clicking this option you can directly open above System Properties Window. (See below picture). So if you can see this option you may skip the first two steps. When you hit the Environment Variables button you can access the Environment Variables window which we talked about the beginning of the Windows section in this tutorial.
4. Here, on the upper side user variable section, select PATH variable and then click to Edit.
5. This is the place where we can either change current path or add new path to our PATH Variable.
Now that we found the right place we can add our new path. I am going to use a small executable file to show you how it works. You may try with any executable file. I have “rufus.exe” on my computer and it is a small executable. This program is used to create a bootable USB from ISO images. My program stored this path in my computer: “C:\Users\ilhan\Downloads\PROGRAM\rufus.exe”. Before adding my application path to Path Variable I open terminal (CMD or PowerShell) in Windows. When I in the default window I write “rufus” and hit enter.
C:\Users\ilhan>rufus 'rufus' is not recognized as an internal or external command, operable program or batch file. C:\Users\ilhan>
As you see my computer does not recognize Rufus because I run the command on a different path. If I add my Rufus file path to my environment variables, my computer start to search Rufus files in all path defined in the variables. Let’s do this.
6. Set up new path and click OK to all open windows.
Now we set up a new path. Please close all PowerShell or CMD windows and open again to take effect on new changes. Now when you write rufus in your terminal anywhere on your computer, your computer will recognize the executable and run the program.
Congratulations, We have successfully set up the PATH variable in our Windows OS using System Properties Window. Next method we are going to use PowerShell terminal Method in case you have a problem with the first method due to restricted privileges.