How to Add PATH to Environment Variables in Windows 11

4 July 2022

Home » Blogs » Windows » How to Add PATH to Environment Variables in Windows 11

PATH is a system variable used to tell the operating system the location of a directory to find the required executable file from the or Terminal window.

The PATH system variable can be managed using the System Utility in the Control Panel. Changing the system PATH variable is usually unnecessary for computers running .

TOP TUTORIALS:  Graphics Performance Optimization (GPU) for Apps and Games in Windows 11

Adding PATH via Control Panel

  1. Open ” “. To open it, click the Start button and in the search box type “view advanced system . Then open the .
view advanced system settings win 11
  1. In the “” window, click the “Advanced” tab. And at the bottom of the window, click the “ button.
Environment Variables win 11
  1. In the “” 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.
TOP TUTORIALS:  How to Enable and Use Live Captions in Windows 11
environment variabel edit win 11
  1. 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.
environment variabel add win 11

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 (). The trick is to run as an . Then type the following command.

TOP TUTORIALS:  Easy Ways to Delete, Reset, and Disable Quick Access in Windows 11

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\"


Submit a Comment