How to Add PATH to Environment Variables in Windows 11

bardimin pic

Written by Bardimin

On July 4, 2022
Home » Blogs » Windows » How to Add PATH to Environment Variables in Windows 11

PATH is a system variable used to tell the the location of a directory to find the required executable file from the or 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

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

Latest Articles

Portable BloatyNosy 0.80 – Debloat and Customize Windows 11

Portable BloatyNosy 0.80 – Debloat and Customize Windows 11

BloatyNosy is a free app that lets you remove the built-in junk apps in Windows that improve your Windows performance. The application is available in portable and installer versions. If you are looking for a free Debloat tool, then you might need to try BloatyNosy...

The sequence of Windows boot processes from zero to ready

The sequence of Windows boot processes from zero to ready

Have you ever wondered how exactly the Windows boot process happens? What processes happen in the background when you press the power button until Windows is ready for you? If yes, then you are in the right place. In this article, Bardimin will explain how all these...

Redirect and Block URLs with HOSTS File on Windows

Redirect and Block URLs with HOSTS File on Windows

Redirect and Block URLs you can easily on Windows. Just by adding the IP of a website, you can redirect or block it. Of course, this is very useful to limit the access of your employees or children from accessing websites that you do not allow. Your Windows PC has...

How to Create Fake Files of Any Size in Windows

How to Create Fake Files of Any Size in Windows

Do you need a file with a size of 10 MB, 100 MB, 1 GB or 1 TB to test? Follow the following article to create one instantly. You don't need to download files or waste time searching for large files, you can create them easily. Sometimes you need large files quickly to...

10 Causes of Windows PC crashes you should know

10 Causes of Windows PC crashes you should know

A fatal error will cause the system to become unstable or busy. Your Windows PC will often display the Blue Screen of Death (BSOD). Do you experience it often? A computer that often crashes is quite annoying for all users, especially when you are doing important work...