9

I found it's not easy to set PATH on Windows. I need to click many times to find the place.

  1. opening up the system properties (WinKey + Pause)
  2. selecting the “Advanced” tab
  3. click the “Environment Variables” button
  4. then adding or selecting the PATH variable

Look it takes so many clicks. Is there any easy way or shortcut to do this?

I know there are commands for this (https://stackoverflow.com/questions/3036325/can-i-set-an-environment-variable-for-an-application-using-a-shortcut-in-windows) but I can't remember...

1
  • Do you want that path to be visible only for a specific program at runtime? or for all programs all time?
    – Biswapriyo
    Commented May 16, 2019 at 13:19

4 Answers 4

17

(via How to Set User Environment Variable Using Setx in Windows 10)

To open the Environment Variables dialog directly, create a desktop shortcut to:

rundll32 sysdm.cpl,EditEnvironmentVariables

To alter System variables, the shortcut has to be run elevated.

1
  • 2
    Nice answer! Note that the setx (here in the same post) can be used in a batch file to if you want to automate setting the path to different things. Commented Jun 11, 2019 at 15:07
5

Solutions I use:

  • Typing systempropertiesadvanced Enter into the Start menu to avoid some clicks
  • Using Rapid Environment Editor (3rd party software)
6
  • 1
    You can also type it into a run box (Win+R) and it will open it directly.
    – Moab
    Commented May 16, 2019 at 16:03
  • 1
    @Moab Typing directly into Start menu is one keystroke quicker, just Win instead of Win+R ;)
    – gronostaj
    Commented May 16, 2019 at 18:05
  • 1
    Thanks. But typing so many characters is another even more "clicks"...
    – Haz Wof
    Commented May 23, 2019 at 4:25
  • @HazWof Then go for option 2. It's not available out if the box, but gets the job done.
    – gronostaj
    Commented May 23, 2019 at 5:04
  • @SeñorCMasMas Interesting, I didn't know that one. I've removed misleading information. Saying that the answer was "plain wrong" in an unjustified exagerration IMO, it still provided useful approaches to this problem. I also don't think that it's "obvious" that you can open that window directly, w32sh's command is far from obvious.
    – gronostaj
    Commented Jun 12, 2019 at 6:04
2

On Windows 7, you can type "env" into the Start Menu Run dialog and select the first link that appears (Edit environment variables for your account). This will take you directly to the Environment Variables dialog. Unfortunately, you will still have to select the variable(s) to edit manually.

As a small addendum, if you simply type "env" (again, in the Run dialog above) and hit Enter, the Environment Variables dialog box will appear without needing to select the first link.

1
  • 2
    Edit environment variables for your account and Edit the system environment variables are available on Windows 10
    – phuclv
    Commented Jun 11, 2019 at 10:36
-2

I used to just winkey+r then set PATH=C:\wherever\

Can't remember if it uses quotes only on spaces or all the time.. I used to have to use this with adb.exe

1
  • 7
    I have no idea how you had any success with this. This will do absolutely nothing. Commented Jun 11, 2019 at 15:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .