PATH - any purpose in Windows XP?

S

Sven Pran

Does the PATH environment variable have any purpose in Windows XP?

I notice on my own machine that I have three entries for Windows itself:
C:\WINDOWS\System32; C:\WINDOWS\; and C:\WINDOWS\System32\Wbem;

and also some entries related to Norton SystemWorks and to Borland Delphi.

I thought PATH became redundant with Windows XP but now I wonder?

Anybody able to clarify?

regards Sven
 
W

Will Denny

Hi

If you type the name of a program file - in Start>Run or from a command
prompt - that isn't in one of the folders in the PATH statement, you will
get an error message saying that the file can't be found. You will then
have to specify the exact Path to that file to run it.
 
S

Sven Pran

I know, but except for windows system applications all my applications
are started by pressing an icon implying a shortcut or (double-)clicking
an entry in a directory list (folder).

The only need for a PATH entry I can think of is if a program needs to
refer to another component without knowing where to look for it.

And (again possibly except for some windows components) I can harly
imagine this to be relevant?

But I believe the only way to find out is to (temporarily) remove a PATH
reference and see if the affected application runs into any kind of
problems.

regards Sven
 
W

Wesley Vogel

Path specifies the search path for executable files.
To find out what executable files you have...

Open a command prompt...
Start | Run | Type: cmd | OK |
When the command prompt opens type:

echo %pathext%

Hit Enter
 
S

Sven Pran

Wesley Vogel said:
Path specifies the search path for executable files.

I know. And with all programs (well maybe other than windows system
programs)
being referred to through shortcuts specifying their location I don't see
the purpose
of using PATH strings any more (other than those referring to
C:\WINDOWS.....)
To find out what executable files you have...

Open a command prompt...
Start | Run | Type: cmd | OK |
When the command prompt opens type:

echo %pathext%
Hit Enter

The system responded:
..COM;.EXE;.BAT;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

and what can I tell from that? I feel no wiser.

Sven
 
T

Torgeir Bakken \(MVP\)

Will said:
Hi

If you type the name of a program file - in Start>Run or from a command
prompt - that isn't in one of the folders in the PATH statement, you will
get an error message saying that the file can't be found. You will then
have to specify the exact Path to that file to run it.
Hi

Not true in all cases, try this command from Start/Run:

iexplore

You will find that IE starts up, but if you look at the path, you
fill not find the path to the IE folder there.

The reason is the AppPaths in registry:

The IEXPLORE.EXE registry key under the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

You will most likely find a lot of other programs there as well, I
have 80 different programs listed there.
 
A

Alex Nichol

Sven said:
Does the PATH environment variable have any purpose in Windows XP?

I notice on my own machine that I have three entries for Windows itself:
C:\WINDOWS\System32; C:\WINDOWS\; and C:\WINDOWS\System32\Wbem;

and also some entries related to Norton SystemWorks and to Borland Delphi.

I thought PATH became redundant with Windows XP but now I wonder?

By no means. It is used as defining the order the system should look
for files - including system utilities and dlls. So it should start
with those three items. Applications are in fact given the chance of
having their personal path addition in the registry (under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths)

but some makers are to proud to use that, so force any searches to go
through their directories no matter what
 
W

Will Denny

Alex Nichol said:
By no means. It is used as defining the order the system should look
for files - including system utilities and dlls. So it should start
with those three items. Applications are in fact given the chance of
having their personal path addition in the registry (under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths)

but some makers are to proud to use that, so force any searches to go
through their directories no matter what

Alex, is there any way during an install of a 3rd party program to stop that
program adding itself to the PATH Statement?
 
T

Torgeir Bakken \(MVP\)

Small correction to key path (space added):
....\App Paths
Alex, is there any way during an install of a 3rd party program to
stop that program adding itself to the PATH Statement?

Nope.
 
A

Alex Nichol

Will said:
Alex, is there any way during an install of a 3rd party program to stop that
program adding itself to the PATH Statement?

Not that I know of, though it would be easy enough to remove afterwards
 
T

Trent©

And how does [[an icon implying a shortcut]] find it's target?

It goes to the directory where the program's executable resides...as
designated by the icon.

The PATH statement only comes into play after the executable is
attempted from the current directory where you reside. If the
executable isn't called from that directory, a search will be made
starting with the first destination in the PATH statement.

When an icon is created by a program during installation, it normally
enters the name of its home directory into the icon...and it tries to
start from that directory.

The PATH statement is valuable when you try to run a program...and you
are not in its home directory.


Have a nice one...

Trent

Budweiser: Helping ugly people have sex since 1876!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top