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.

Published
Categorized as vista

53 comments

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

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

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

  4. 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:cygwinbin 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

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

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

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

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

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

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

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

  12. %SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;%SystemRoot%

    If you type ‘command’ and then path

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

    PATH=C:\WindowsSystem32;C:WindowsSystem32When

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

  13. ERROR ABOVE : I’m so sorry.

    This is the right one.

    %SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem

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

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

    Many thanks again!

  15. “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?

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

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

  18. 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%System32Wbem

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

    borlandbcc55bin 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?

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

    %CommonProgramFiles%Microsoft SharedWindows Live;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;%SYSTEMROOT%System32WindowsPowerShellv1.0

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

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

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

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

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

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

Leave a Reply to nimo Cancel reply

Your email address will not be published. Required fields are marked *