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

  • Thread starter Thread starter Sabine Elsner
  • Start date Start date
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
 
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
 
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.
 
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.
 
Back
Top