Don’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.
Download Rock Show, the Concert Posters app for the iPhone and iPad
The easy way:
- Click Start and choose Control Panel
- In the Search box on the top right of the window type “system path” (no quotes)
- Click “Edit the system environment variables”
- Begin at step 4 below.
The hard way:
- Click Start and choose Control Panel
- Click System, on the right you’ll see “View basic information about your computer”
- On the left is a list of tasks, the last of which is “Advanced system settings.” Click that.
- The Advanced tab of the System Properties dialog box is shown. Click the Environment Variables button on the bottom right.
- In the lower box titled “System Variables” scroll down to Path and click the Edit button.
- Change your path as need be.
- 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.
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!
Hey, that looks handy.
*installs*
Doh. Doesn’t look like this thing likes Vista very much. 🙁
GnuWin32 is similar, but still maintained. Find it at http://gnuwin32.sourceforge.net/
Cool, Andrew. I’ll check it out. Thanks.
Thanks for the helpful instructions. I was looking all over trying to find out where Vista hid the Environment variables!
Gee, I spent hours and hours trying to change my system path, and seconds doing it from your instructions. Thanks!
Thanks! It saved me quite sometime. Is pretty hard to find it… help does not help much either…
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.
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
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.
Thanks for the quick tip. I was very useful for me too!
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.
Excellent help…..!
my Windows don’t have PATH….
why!!?
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.
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!
Thank you so much. May the Gods/Goddesses of digital happiness beat a PATH to your door…
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
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
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
Thanks for the help!!
Besten Dank!
Because of your report, I am rescued from a time wasting and enervating search.
i have delete the system variable path, how can i get back the default?
Great Site, great answers!!!
Thanks for not trying to shove UNIX down my throat.
Great information! Thanks for the Help
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
ok i deleted my path variable in windows vista does anyone know the variable value i require to reset it?
%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. 🙂
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.
Thanks Rob.
Following your hard-way advices I changed the PATH env. variable in order to incorporate PHP functionality.
Many thanks again!
“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?
Very useful links… Thanks much!! 🙂
This was extremely useful! I was looking everywhere trying to figure out how to change system variables in Vista.
PowerShell understands ls, rm, and forward slashes, but doesn’t have grep, sed, awk, or those wonderful things.
Great, simple advice. Thanks. Roll on Windows 7…
Hey do u know wat the default path is?
Thanks, worked without a restart. I am using Windows Vista Service Pack 1
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
Thanks! That was exactly what I needed!
THANKS.
thank you very much…………….
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?
I’ve got all this stuff in my path. Is this healthy?
%CommonProgramFiles%Microsoft SharedWindows Live;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;%SYSTEMROOT%System32WindowsPowerShellv1.0
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?
Does anyone here know how to get your default path? I messed it up, and I dont know how to fix!. Someone please reply.
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.
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!
If you accidently deleted the path, how do you get it back. I accidently did, and I have no idea what it was.
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.
Thanks for the excellent post. Very helpful… 🙂