PATH is a system variable used to tell the operating system the location of a directory to find the required executable file from the command line or Terminal window.
The PATH system variable can be managed using the System Utility in the Windows Control Panel. Changing the system PATH variable is usually unnecessary for computers running Windows.
Adding PATH via Control Panel
- Open ” System Properties “. To open it, click the Start button and in the search box type “view advanced system settings”. Then open the application.
- In the “System Properties” window, click the “Advanced” tab. And at the bottom of the window, click the “Environment Variables” button.
- In the “Environment Variables” window, you will see two types of variables. At the top are “User variables”. If you add PATH to this section, the variable only applies to the current user. Meanwhile, if you add PATH at the bottom, “System variables”, the variables will apply to all users. Select “PATH” and then click the “Edit” button.
- Next, click the “Browse” button and navigate to the directory the executable (exe) file is located. Then click the “OK” button and click all the “OK” buttons again to add the directory.
Other Interesting Articles
Adding PATH to a batch file
This option only affects your current shell session, not the entire system. Run this command in the command window you have opened or add it to the batch file you created.
set PATH=%PATH%;C:\your\path\here\
Adding PATH via CMD
You can also add a PATH via Command Prompt (CMD). The trick is to run CMD as an administrator. Then type the following command.
Add directory to PATH User variables :
setx path "%PATH%;C:\path\to\directory\"
Add directory to PATH System variables :
setx /M path "%PATH%;C:\path\to\directory\"