Problems setting PATH variable

EvilManagedCare

Senior member
Nov 6, 2004
324
0
0
Hi,

I have added a path to my PATH variable with the idea of being able to invoke an executable from the command line in Windows XP. The executables reside in C:\68000. I have added the latter to the 'User Variables for Owner' window. I am following the instructions set forth by multiple websites. Yet I cannot invoke the programs from anywhere except when the prompt is C:\68000. Shouldn't I be able to invoke the commands from any prompt? I admit I may be misguided on what adding a variable to the path does.

What am I doing wrong?

Thanks in advance.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: Snapster
Have you rebooted since changing the PATH vars?

No need to reboot, but a new command shell needs to be opened. Try it again and after type 'path' in your cmd prompt, post its output...
 

EvilManagedCare

Senior member
Nov 6, 2004
324
0
0
Here is the output from the command line for path as it appears on screen:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Owner>path
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\QuickTime\QTSystem;C:\Program Files\CollabNet Subversion;C:\Program Files\SSH Communications Security\SSH Secure Shell; C:\68000

The program in question is in C:\68000. There are no subfolders in it.
 

Allanv

Senior member
May 29, 2001
905
0
0
move the c:\68000 closer to the start of the PATH line

C:\Documents and Settings\Owner>path
PATH=C:\68000;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\QuickTime\QTSystem;C:\Program Files\CollabNet Subversion;C:\Program Files\SSH Communications Security\SSH Secure Shell;

Something like that, when i used to script i would often find that putting the path variable to the end resulted it in not working.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Or it could just be because of the space between ; and c:\68000, I don't know if that matters or not.
 

MadRat

Lifer
Oct 14, 1999
12,010
320
126
Yes, spaces do matter in the path. You can hand edit the path and remove spaces in any entry that doesn't need it. And one problem they've had since the early days of NT is a 256 character limit for the path. Truncating paths to the smallest possible space is the only way to beat the 256 character limit. I used to run into that problem all the time with developers' machines and their extraordinary ability to install shit awful programs that required path entries.

Example:

Any entry using "Program Files" in the path can be truncated down to "progra~1" depending if there is more than one folder on the drive starting with the letters p-r-o-g-r-a. Once had a guy that made a "programs" folder on his system drive and so I had to change multiple entries to "progra~2" in his path.
 

EvilManagedCare

Senior member
Nov 6, 2004
324
0
0
Well, I tried moving C:\68000 to the front of the path, and truncated Program Files to Progra~1, and still no go. At the command line when invoking programs that are in C:\68000 I get the error still. Any other suggestions?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Did you make sure to restart cmd and verify that the PATH variable was indeed updated after making your change?
 

MadRat

Lifer
Oct 14, 1999
12,010
320
126
I once ran into a problem where the dll the program was looking for was called from the wrong path location. A different program used an older copy of the dll and when it wanted the specific one it kept finding the older copy. Ended up having to set the program to run from the specific directory to get it to use the local copy before it tried to search for others.