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...

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

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

|improve this answer|||||
  • 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. – Señor CMasMas Jun 11 '19 at 15:07

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.

|improve this answer|||||
  • 2
    Edit environment variables for your account and Edit the system environment variables are available on Windows 10 – phuclv Jun 11 '19 at 10:36

Solutions I use:

  • Typing systempropertiesadvanced Enter into the Start menu to avoid some clicks
  • Using Rapid Environment Editor (3rd party software)
|improve this answer|||||
  • 1
    You can also type it into a run box (Win+R) and it will open it directly. – Moab May 16 '19 at 16:03
  • 1
    @Moab Typing directly into Start menu is one keystroke quicker, just Win instead of Win+R ;) – gronostaj May 16 '19 at 18:05
  • Thanks. But typing so many characters is another even more "clicks"... – Haz Wof May 23 '19 at 4:25
  • @HazWof Then go for option 2. It's not available out if the box, but gets the job done. – gronostaj May 23 '19 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 Jun 12 '19 at 6:04

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

|improve this answer|||||
  • 5
    I have no idea how you had any success with this. This will do absolutely nothing. – Señor CMasMas Jun 11 '19 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.