Adding a path to an EXE file allows users to access it from anywhere without having to switch to the actual directory. You can add any path that you like and there are no restrictions to which drive or folder the EXE should be in. You will need administrative rights to add a Path variable. Alternatively, just type the following in the address bar in File Explorer. On the System Properties screen, go to the Advanced tab. Click the Environment Variables button at the very bottom.
On the Edit Environment variable window, click the New button. This will add a new field inside the list of paths. When you add an EXE path as an environment variable, you can access the program from any command line. The command line in Windows being the Command Prompt, you can open a Command Prompt in any location and run commands. Which paths you add is entirely up to you since you know which programs you need to access from the Command Prompt.
This will open up the Power User Tasks Menu. Depending on your settings, this process may open the Start menu instead. Under the System menu, you need to click the Advanced System Settings.
Once Advanced System Settings is open, click on the Advanced tab, then look on the bottom-right side for the Environment Variables. A dialog box will pop up, allowing you to enter a new variable name and to set its initial value:. 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 in the System Variables section that you can examine by clicking Edit. These Windows environment variables are very useful and can be used in scripts as well as on the command line. This prints out all the environment variables that are set on your system. There are several reasons that you may not be able to set these variables.