RSS

vista rob on 03 Mar 2007 09:14 pm

Changing Your System Path in Windows Vista

dos promptDon’t forget to follow me on twitter.

[Note: Since this was written, I downgraded from Vista (because it wasn't stable enough) and went back to XP.  These days I'm looking much harder at moving to a Mac.]

One of the things I really like about Vista is the help. So far it has delivered the goods as I get adjusted to the changes from XP. One of the things I didn’t find easily in Windows Vista help was how to change my system path.

A system path is an environment variable and has been around since the DOS days. Back then you wanted to be able to execute certain files from anywhere in your file system. Now-a-days there isn’t much emphasis on maintaining a good system path because people generally create shortcuts directly to the programs they need (or the installation software does it for you). Also most people don’t use the command prompt at this point.

Our local development environment for Podcastinople is pretty complicated. It uses a lot of Ruby on Rails components, ImageMagick, Rmagick, Tortoise SVN and Posgres SQL. I had to get all these installed and set up because of my migration to a clean install of Vista, and one of the steps is a manual change to the system path.

So when Windows Vista Help let me down I searched G for system path windows vista and came up with nothing. A little guessing based on a guide for XP and I was able to find it. There are two ways to do this.

concert posters rock show ipad iphone

Download Rock Show, the Concert Posters app for the iPhone and iPad

The easy way:

  1. Click Start and choose Control Panel
  2. In the Search box on the top right of the window type “system path” (no quotes)
  3. Click “Edit the system environment variables”
  4. Begin at step 4 below.

The hard way:

  1. Click Start and choose Control Panel
  2. Click System, on the right you’ll see “View basic information about your computer”
  3. On the left is a list of tasks, the last of which is “Advanced system settings.” Click that.
  4. The Advanced tab of the System Properties dialog box is shown. Click the Environment Variables button on the bottom right.
  5. In the lower box titled “System Variables” scroll down to Path and click the Edit button.
  6. Change your path as need be.
  7. Restart your system. Vista didn’t pick up the system path environment variable change until I restarted.

I go back and forth between Windows and Unix enough that I find myself typing “ls” the directory listing for Unix/Linux based systems when I meant to type “dir”. To fix this I add a file called ls.bat to a folder that is in my system path that contains the dir command. This saves me a few oops commands on occasion.

51 Responses to “Changing Your System Path in Windows Vista”

  1. on 04 Mar 2007 at 5:51 pm 1.dave said …

    A better solution to your ‘ls’ problem would be to install the unix gnu tools for windows:

    http://unxutils.sourceforge.net/

    just unzip them in a good place and add the dir to your path :) then you get a bunch of other good tools too!

  2. on 04 Mar 2007 at 6:40 pm 2.Rob said …

    Hey, that looks handy.

    *installs*

    Doh. Doesn’t look like this thing likes Vista very much. :(

  3. on 04 Apr 2007 at 3:57 am 3.Andrew said …

    GnuWin32 is similar, but still maintained. Find it at http://gnuwin32.sourceforge.net/

  4. on 04 Apr 2007 at 10:24 am 4.rob said …

    Cool, Andrew. I’ll check it out. Thanks.

  5. on 06 Jul 2007 at 1:32 pm 5.Brian said …

    Thanks for the helpful instructions. I was looking all over trying to find out where Vista hid the Environment variables!

  6. on 16 Oct 2007 at 7:43 am 6.stephen said …

    Gee, I spent hours and hours trying to change my system path, and seconds doing it from your instructions. Thanks!

  7. on 23 Oct 2007 at 7:32 am 7.Abhishek Padmanabh said …

    Thanks! It saved me quite sometime. Is pretty hard to find it… help does not help much either…

  8. on 27 Oct 2007 at 10:22 am 8.John Xie said …

    A faster way (if you are using classic taskbar and have the computer icon on your desktop) is to right click computer icon, choose property, then click on advanced system settings, then click on environment variables.

    Also, you don’t have to reboot. The path changes is taken place immediately, you can verify this by type “set” in the command prompt and look at the “path=..” string.

  9. on 11 Nov 2007 at 8:20 am 9.Daniel Brockman said …

    Thank you for the info on how to change the macrosuck environment variable. i also struggled for quite a while till i found your wisdom.

    I have used cygwin unix for many years on my windows pcs.

    http://www.cygwin.com/

    Not only do you get ls and other basic unix commands, but you also get perl, ruby, apache, gcc and a lot of other fine unix stuff.

    Install cygwin, put the cygwin /usr/bin dir on your path (usually C:\cygwin\bin unless you begin tinkering with it).

    Caveat: a few years ago, an object oriented zealot (OOZ) improved bash and sh (same executable, in truth) so they no longer work without specified options. So, where you formerly would write

    #! /usr/bin/sh

    or

    #! /usr/bin/bash

    you now will write

    #! /usr/bin/sh -o igncr

    or

    #! /usr/bin/bash -o igncr

    db

  10. on 31 Dec 2007 at 11:31 pm 10.Fred Zarguna said …

    You do not need to re-boot, provided the process you want to have the new path available to is started *AFTER* the change in environment variables.

    For the desktop, you could close all instances of explorer in the task manager, then restart explorer.exe to open a fresh desktop. For a command prompt, just open one–it should reflect the altered path.

  11. on 10 Jan 2008 at 2:14 am 11.Marius B said …

    Thanks for the quick tip. I was very useful for me too!

  12. on 25 Jan 2008 at 2:12 pm 12.Eric said …

    You don’t need to reboot for the change to take effect. However, only command windows opened *after* the change will see it. If you had a command window open before the change, it won’t see subsequent changes to the environment variables made outside of itself.

  13. on 01 Jul 2008 at 3:18 pm 13.sandhya said …

    Excellent help…..!

  14. on 22 Jul 2008 at 12:29 pm 14.Robert said …

    my Windows don’t have PATH….
    why!!?

  15. on 29 Jul 2008 at 9:34 pm 15.Don said …

    Googled ‘Windows Vista PATH variable’ after struggling through Vista help and came immediately here. Thanks for the information and for taking the time to post.

  16. on 09 Aug 2008 at 4:34 pm 16.Kdaunt said …

    Thanks – I was going nuts trying to get the Vista help to tell me this secret. One second searching online and I found your article. Kudos!

  17. on 26 Aug 2008 at 3:48 am 17.rein said …

    Thank you so much. May the Gods/Goddesses of digital happiness beat a PATH to your door…

  18. on 23 Sep 2008 at 2:15 am 18.Gabriel Spencer said …

    I went to copy a path for java, I’m a student, and mistakenly took out the origanal path could someone please help? I’m running Vista home premium sp1

  19. on 25 Sep 2008 at 6:40 pm 19.phomaster said …

    Easier way to get to PATH in Vista:

    Right click on MY COMPUTER, click on Properties; then click on “advanced settings”, then on Environment Vars

  20. on 03 Oct 2008 at 6:54 am 20.Jerome said …

    Thx i couldnt find it in 2 min so i searched inet for “vista path variable” then found ur article first website gg ty =D

  21. on 13 Nov 2008 at 9:39 pm 21.G said …

    Thanks for the help!!

  22. on 18 Nov 2008 at 4:28 am 22.Dirk said …

    Besten Dank!
    Because of your report, I am rescued from a time wasting and enervating search.

  23. on 27 Nov 2008 at 7:30 pm 23.leng chen peng said …

    i have delete the system variable path, how can i get back the default?

  24. on 01 Dec 2008 at 4:18 am 24.Quien Conqlin said …

    Great Site, great answers!!!
    Thanks for not trying to shove UNIX down my throat.

  25. on 10 Jan 2009 at 9:26 am 25.John said …

    Great information! Thanks for the Help

  26. on 18 Jan 2009 at 1:43 pm 26.Jon Armani said …

    Actually, the easiest way to get to that screen is:

    1. Press the Win-key
    2. Type sysdm.cpl in the search bar
    3. Press enter

  27. on 29 Jan 2009 at 11:47 am 27.nimo said …

    ok i deleted my path variable in windows vista does anyone know the variable value i require to reset it?

  28. on 02 Feb 2009 at 8:47 pm 28.andre said …

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%

    If you type ‘command’ and then path

    you will see the path and it will look like
    this:

    PATH=C:\\Windows\System32;C:\Windows\System32\When

    PS. I’m using Vista Home Basic. This path statement might not be perfectly right for you. But it can’t
    hurt anything if it’s wrong. Some things just won’t work and you’ll have to change it to the right path. which I suppose someone will post here. :)

  29. on 02 Feb 2009 at 8:52 pm 29.andre said …

    ERROR ABOVE : I’m so sorry.

    This is the right one.

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

    ( I had added some folders to my path and that’s why I made an error when removing the end of my path statement to put it back how it was originally)

    Even the ‘wrong one’ should work OK. The right path is in there. With a bit extra for ‘good luck’. But change it to be right as if there’s two versions of something in the root directory then a problem might occur if one version doesn’t read but the other version , in the root , does read.

  30. on 28 Mar 2009 at 2:20 am 30.Styl said …

    Thanks Rob.
    Following your hard-way advices I changed the PATH env. variable in order to incorporate PHP functionality.

    Many thanks again!

  31. on 28 Mar 2009 at 1:46 pm 31.Lythande BlueStar said …

    “1.dave said …

    A better solution to your ‘ls’ problem would be to install the unix gnu tools for windows:…”

    Is there one for windows 64-bit?

  32. on 04 Apr 2009 at 11:54 pm 32.Ajaykumar said …

    Very useful links… Thanks much!! :)

  33. on 13 Apr 2009 at 12:43 am 33.Sue said …

    This was extremely useful! I was looking everywhere trying to figure out how to change system variables in Vista.

  34. on 20 Apr 2009 at 5:16 pm 34.Jon said …

    PowerShell understands ls, rm, and forward slashes, but doesn’t have grep, sed, awk, or those wonderful things.

  35. on 24 Apr 2009 at 1:32 am 35.Phil said …

    Great, simple advice. Thanks. Roll on Windows 7…

  36. on 04 Jun 2009 at 6:50 pm 36.Vinny said …

    Hey do u know wat the default path is?

  37. on 22 Jun 2009 at 6:28 am 37.Manav Kataria said …

    Thanks, worked without a restart. I am using Windows Vista Service Pack 1

  38. on 28 Jun 2009 at 9:45 pm 38.Lovecraft said …

    Thanks! I have been having to use Vista lately and this info was just what I needed for setting up a development environment I needed.
    For those asking about a default path, here is a typical one for Vista:
    PATH = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

  39. on 30 Jun 2009 at 12:38 pm 39.Chris said …

    Thanks! That was exactly what I needed!

  40. on 05 Jul 2009 at 8:05 pm 40.Patrick said …

    THANKS.

  41. on 18 Aug 2009 at 9:52 am 41.prashant said …

    thank you very much…………….

  42. on 25 Aug 2009 at 11:22 am 42.Renee said …

    i am in c++ and we are using the borland compiler.

    we need to run the programs off our flash drives and have our compilers on them, we need to set a path to:

    borland\bcc55\bin to bcc32.exe

    which when done correctly is suppose to allow us to type: bcc32 and it will run without us being in its directory.

    some of us have vista and it will not set the system path, how or can we do this off our flash drives?

  43. on 04 Sep 2009 at 9:53 am 43.Ray Maruschak said …

    I’ve got all this stuff in my path. Is this healthy?

    %CommonProgramFiles%\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

  44. on 04 Sep 2009 at 9:56 am 44.Ray Maruschak said …

    I foolishly changed a path in the registry to D:\Program Files.

    I’m trying to run Control Panel — Scanners and Cameras.

    I get error “Windows cannot find the program “D:\Program’. Make sure you typed the words correctly, and then try again.”

    I regret changed a path in the registry without backup. I see the harm it has done.

    I promise to learn to back up the Registry before I fiddle with it.

    Can someone help me get the “Control Panel — Scanners and Cameras” back?

  45. on 13 Mar 2010 at 5:24 am 45.Ahsan said …

    Does anyone here know how to get your default path? I messed it up, and I dont know how to fix!. Someone please reply.

  46. on 08 Apr 2010 at 3:29 am 46.Ernest said …

    Repeatedly, 1 hr, tried your advice.
    Can’r get it to work
    Typing “set” shows path name changed in Command Prompt
    when I type in the exe file name that is in the bin file it is not recognised?
    Why?
    Just another way computers waste our lives.
    Does it matter where I have stored the executable file, or is only important to have the right path to it? Currently have it in my Downloads directory.
    Should I manually move it to the Grograms directory?

    You advice would be very welcome
    Thank you.

  47. on 22 May 2010 at 5:45 pm 47.Jared said …

    Just a note that I also had to reboot to make the changes take, restarting explorer and restarting the command prompt did not work.

    Also, keep in mind that %SystemRoot% is c:\windows and not c:

    Thanks, this article helped alot!

  48. on 17 Nov 2010 at 8:20 am 48.FlashDevelop and BlackBerry PlayBook Development: The Basics « studio|chris · Greenwood, SC studio|chris · Greenwood, SC said …

    [...] If you haven’t already, download both the BlackBerry Tablet OS SDK and the BlackBerry PlayBook Simulator from BlackBerry’s Tablet OS Development Resources. Install both of these using the instructions provided in the Getting Started Guide. Be sure to add the SDK to your Environment variables in the PATH variable (Windows XP | Windows Vista & 7). [...]

  49. on 11 Apr 2011 at 2:50 pm 49.Bonboneater said …

    If you accidently deleted the path, how do you get it back. I accidently did, and I have no idea what it was.

  50. on 20 Jul 2011 at 8:14 pm 50.mikey said …

    i forgot to mention that this is on windows vista…i looked at your original message and followed instructions..but i can’t find what i need to change.

  51. on 07 Aug 2011 at 12:26 am 51.Kobra said …

    Thanks for the excellent post. Very helpful… :)

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply