If you're a coder or programmer, you probably spend a decent corporeality of time using the command prompt to execute programs or compile code. In guild to consummate those tasks, you most probable have to use a command from a library or software package installed (like Python) on your organization.

By default, about of these programs volition add their own custom shortcuts to the Windows surround variables. The almost used environment variable in Windows is probably the PATH variable. It basically allows you to run any executables that are located inside the paths specified in the variable at the command prompt without having to requite the full path to the executable.

In this commodity, I'll bear witness you how y'all can add more than paths to the Windows PATH variable in case yous want to run executables from your own custom directories.  It'due south worth noting that the procedure below is for Windows 10, simply information technology's almost exactly the aforementioned for Windows 7 likewise.

Add Directories to PATH Variable

To get started, right-click on the Computer or This PC icon on the desktop and select Properties. If you lot don't accept that icon on your desktop already, you can add any missing desktop icons easily.

On the System dialog page, y'all'll see an Advanced organisation settings link on the left-paw side.

This will bring up the System Properties dialog, which should already be open up to the Advanced tab. Go ahead and click on the Surroundings Variables push at the very bottom.

On the Environment Variables dialog, you'll encounter two sets of variables: one for user variables and the other for organisation variables. Both lists accept the PATH variable, and then you accept to decide which one to edit.

If you only demand the commands for your ain user account, then edit the user variable. If you lot need information technology to work beyond the estimator organization regardless of which user is logged in, then edit the system variable. Click on Path and then click on Edit.

On the Edit environment variable dialog, you'll come across a list of all the paths that are currently in the PATH variable. Equally yous tin can see, Node.js and Git already added their paths so that I tin can run Git commands and Node.js commands from anywhere while in the command prompt.

To add a new path, simply click on New and it'll add a new line to the bottom of the list. If you know the path, only type it in or copy and paste it. If you prefer, you tin can also click Scan and so navigate to the desired path.

To edit any path, merely select it so click on the Edit button. You tin can also delete paths using the Delete button. Note that yous can also move items up and down on the list. When you type a command at the command prompt, Windows has to search through each directory stored in the PATH variable to see if that executable exists or not. If you want your executable to be found faster, but move that path up to the top of the list.

This can too come up in handy if you have multiple versions of the aforementioned command in different paths and need to have i run instead of the other. The one that shows up college in the list volition be run when you type in the command.

Lastly, if yous click on Edit text, it will load a dialog where you tin can edit the Path variable using the former interface where all the paths are listed in ane text box.

That'southward all there is to it! If y'all desire to learn more most environment variables, make sure to bank check out my mail on how to create your ain custom environment variables. Enjoy!