What has priority: PATH from User variables or system variables?

S

Sabine Elsner

In WinXP I can setup/change under System->Advanced->Environment Variables
the PATH variable in two ways:
By changing the entry under "user variables" and under "system variables".

Until now I thought that the "User variables" settings have priority over
the system variables. So the sequence of PATHs I expected was

PATH=%PATH%(from user variable;%PATH%(from system variable)

But as I had to notice this is NOT the case!

When I type

"set"

at the command prompt then the system variable PATH come BEFORE user variable PATH.
Is there a way to change the sequence?

Sabine
 
T

Thee Chicago Wolf

In WinXP I can setup/change under System->Advanced->Environment Variables
the PATH variable in two ways:
By changing the entry under "user variables" and under "system variables".

Until now I thought that the "User variables" settings have priority over
the system variables. So the sequence of PATHs I expected was

PATH=%PATH%(from user variable;%PATH%(from system variable)

But as I had to notice this is NOT the case!

When I type

"set"

at the command prompt then the system variable PATH come BEFORE user variable PATH.
Is there a way to change the sequence?

Sabine

System variables are parsed first and then user variables.

- Thee Chicago Wolf
 
P

Pegasus \(MVP\)

Sabine Elsner said:
In WinXP I can setup/change under System->Advanced->Environment Variables
the PATH variable in two ways:
By changing the entry under "user variables" and under "system variables".

Until now I thought that the "User variables" settings have priority over
the system variables. So the sequence of PATHs I expected was

PATH=%PATH%(from user variable;%PATH%(from system variable)

But as I had to notice this is NOT the case!

When I type

"set"

at the command prompt then the system variable PATH come BEFORE user
variable PATH.
Is there a way to change the sequence?

Sabine

I don't know of any way to change the order but you could use an alternative
method to set your path. Instead of modifying it via the Control Panel,
insert a setx.exe command into your logon script. It lets you modify
environmental variables by modifying the user's hive of the registry. You
can download setx.exe with the Windows Resource Kit.
 
A

Allan

Sabine Elsner said:
In WinXP I can setup/change under System->Advanced->Environment Variables
the PATH variable in two ways:
By changing the entry under "user variables" and under "system variables".

Until now I thought that the "User variables" settings have priority over
the system variables. So the sequence of PATHs I expected was

PATH=%PATH%(from user variable;%PATH%(from system variable)

But as I had to notice this is NOT the case!

When I type

"set"

at the command prompt then the system variable PATH come BEFORE user
variable PATH.
Is there a way to change the sequence?
The user set `PATH' variable is appended to the system `Path' variable. If
something has to precede the user `PATH' variable use the system `PATH'
variable instead.
 

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