Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manage PATH variable in Windows?

Every time I experiment with a new language, compiler, interpreter, tool, or whatever, and I want to run that from the command line, I would have to go to System and change my PATH variable. However, the box to put the monster string in consists of only a 1-line text box. I frequently find myself having to copy/paste the PATH string into Notepad just to edit it -- It's already over half a page. Right now I've counted about 30 different path URL's.

Is there a better way to manage paths than to squeeze all of them into one string? I'm thinking of using SUSE for development since my PATH is so messed up.

like image 496
Lucky Avatar asked May 07 '09 14:05

Lucky


People also ask

How do I manage Environment Variables in Windows?

On the Windows taskbar, right-click the Windows icon and select System. In the Settings window, under Related Settings, click Advanced system settings. On the Advanced tab, click Environment Variables. Click New to create a new environment variable.

How do I edit the PATH in Windows 10?

Setting the path and variables in Windows 10 In the System Properties window, click the Advanced tab, then click the Environment Variables button near the bottom of that tab. In the Environment Variables window (pictured below), highlight the Path variable in the System variables section and click the Edit button.

Does Windows have a PATH variable?

In Windows 10, the PATH system variable is configured through the System Properties window. There are various methods for users to access the System Properties window; for example, users can search view advanced system settings from the taskbar ⊞ Start menu.


3 Answers

There is a really nice freeware environment editor available called RapidEE

Rapid Environment Editor

Rapid Environment Editor (RapidEE) is an environment variables editor.

It includes an easy to use GUI and replaces the small and inconvenient Windows edit box.

RapidEE 8.x supports Windows XP, 2003, Vista, 2008, Windows 7, Windows 8 & Windows 10 (including 64-bit versions).

If you still use Windows NT or 2000, then use version 6.1. For Windows 9x or ME use version 2.1.

Features

  • Editable tree: Show environment variables and values as an editable tree.
  • Portable mode: RapidEE doesn't require installation and could be run as a "portable application".
  • Error checking: Automatically checking for invalid pathnames and filenames
  • Multilanguage interface: RapidEE is translated into a number of languages (English, Russian, Japanese, French, Polish, German, Italian, Latvian, Slovak, Greek, Spanish, Chinese, Dutch, Swedish, Korean, Croatian, Danish, Brazilian Portuguese, Finnish, Norwegian, Indonesian, Romanian, Hungarian, Turkish, Abkhazian, Ukrainian, Czech, Arabic), and the language can be changed on the fly.
like image 181
David Taylor Avatar answered Oct 31 '22 06:10

David Taylor


If you always start the command line from one or a few shortcuts, you can run a batch file when it starts. For example:

cmd /k autoexec_console.cmd

where the batch file could have

set path=c:\foo;%path%

or anything else, and this would persist only for that cmd.exe instance.


XP's Service Pack 2 Support tools (looks like there's one for SP3, but it doesn't say what's in it) comes with a program setx.exe that works like a permanent set.

like image 34
Anonymous Avatar answered Oct 31 '22 06:10

Anonymous


To better mange very long PATH in the default windows interface, you can have variable evaluated into variables :

SDKPATH -> some_sdk_path; some_more_sdk_paths; some_more_sdk_paths;
DEVPATH -> some_dev_path; some_more_dev_paths; %SDKPATH%
PATH    -> some_common_path; some_mode_paths; %DEVPATH%
like image 41
Coincoin Avatar answered Oct 31 '22 05:10

Coincoin