PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

Environment Variables - System vs. User

 
 
Rhino
Guest
Posts: n/a
 
      1st Apr 2005
Can anyone please explain the difference between the 'system' and 'user'
variables in XP (Professional)?

I have an environment variable named classpath which occurs in both the
'system' and 'user' (Rhino) variables on my machine. The values of classpath
are dramatically different in 'system' than in 'user'. When I am logged on
as Rhino, will Windows use the 'user' version of the classpath or does it
concatenate the 'user' and 'system' values of classpath??

--
Rhino


 
Reply With Quote
 
 
 
 
george
Guest
Posts: n/a
 
      1st Apr 2005

"Rhino" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can anyone please explain the difference between the 'system' and 'user'
> variables in XP (Professional)?
>
> I have an environment variable named classpath which occurs in both the
> 'system' and 'user' (Rhino) variables on my machine. The values of
> classpath
> are dramatically different in 'system' than in 'user'. When I am logged on
> as Rhino, will Windows use the 'user' version of the classpath or does it
> concatenate the 'user' and 'system' values of classpath??
>
> --
> Rhino
>
>


Environment variables are 'evaluated' (ie. they are attributed) in the
following order:

1. System variables
2. variables defined in autoexec.bat
3. User variables

so if classpath is defined in all thre of them, the effectively the value
defined as user variable will be the resulting one.

They are not concatenated, the value of a given variable is simply set to
whatever is defined.

There is no difference, it is just a method of having certain variables set
regardless of the user that is logged on (the system variables) and
variables that can be different depending on the user that is logged on.

hth

george



 
Reply With Quote
 
 
 
 
Wesley Vogel
Guest
Posts: n/a
 
      1st Apr 2005
[[System environment variables are defined by Windows 2000 Server and
are the same no matter who is logged on to the computer. Administrator
group members can add new variables or change the values, however.

User environment variables can be different for each user of a
particular computer. They include any environment variables you want to
define or variables defined by your applications, such as the path where
application files are located.]]


[[System Variables
You must be an administrator to modify a system environment variable.
System environment variables are defined by Windows and apply to all
computer users. Changes to the system environment are written to the
registry, and usually require a restart to become effective.

User Variables for User Name
Any user can add, modify, or remove a user environment variable. These
variables are established by Windows XP Setup, by some programs, and by
users. The changes are written to the registry, and are usually
effective immediately. However, after a change to user environment
variables is made, any open software programs should be restarted to
force them to read the new registry values. ]]

HOW TO Manage Environment Variables in Windows XP
http://support.microsoft.com/default...b;en-us;310519

[[User environment variables for logged_on_user_name
The user environment variables are different for each user of a
particular computer. The variables include any that are set by the user,
as well as any variables defined by programs, such as the path to the
location of the program files.

System environment variables
Administrators can change or add environment variables that apply to the
system, and thus to all system users. During installation, Windows Setup
configures the default system variables, such as the path to the Windows
files.]]

Setting environment variables
http://www.microsoft.com/resources/d...variables.mspx


User Environment Variables
http://msdn.microsoft.com/library/de..._variables.asp


--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:(E-Mail Removed),
Rhino <(E-Mail Removed)> hunted and pecked:
> Can anyone please explain the difference between the 'system' and
> 'user' variables in XP (Professional)?
>
> I have an environment variable named classpath which occurs in both
> the 'system' and 'user' (Rhino) variables on my machine. The values
> of classpath are dramatically different in 'system' than in 'user'.
> When I am logged on as Rhino, will Windows use the 'user' version of
> the classpath or does it concatenate the 'user' and 'system' values
> of classpath??
>
> --
> Rhino


 
Reply With Quote
 
Rhino
Guest
Posts: n/a
 
      1st Apr 2005

"Rhino" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can anyone please explain the difference between the 'system' and 'user'
> variables in XP (Professional)?
>
> I have an environment variable named classpath which occurs in both the
> 'system' and 'user' (Rhino) variables on my machine. The values of

classpath
> are dramatically different in 'system' than in 'user'. When I am logged on
> as Rhino, will Windows use the 'user' version of the classpath or does it
> concatenate the 'user' and 'system' values of classpath??
>

Thank you both, George and Wesley, for your replies. They helped me solve my
problem!

Rhino


 
Reply With Quote
 
David Candy
Guest
Posts: n/a
 
      1st Apr 2005
Though path is concatinated.

--
----------------------------------------------------------

"george" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>
> "Rhino" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Can anyone please explain the difference between the 'system' and 'user'
>> variables in XP (Professional)?
>>
>> I have an environment variable named classpath which occurs in both the
>> 'system' and 'user' (Rhino) variables on my machine. The values of
>> classpath
>> are dramatically different in 'system' than in 'user'. When I am logged on
>> as Rhino, will Windows use the 'user' version of the classpath or does it
>> concatenate the 'user' and 'system' values of classpath??
>>
>> --
>> Rhino
>>
>>

>
> Environment variables are 'evaluated' (ie. they are attributed) in the
> following order:
>
> 1. System variables
> 2. variables defined in autoexec.bat
> 3. User variables
>
> so if classpath is defined in all thre of them, the effectively the value
> defined as user variable will be the resulting one.
>
> They are not concatenated, the value of a given variable is simply set to
> whatever is defined.
>
> There is no difference, it is just a method of having certain variables set
> regardless of the user that is logged on (the system variables) and
> variables that can be different depending on the user that is logged on.
>
> hth
>
> george
>
>
>

 
Reply With Quote
 
george
Guest
Posts: n/a
 
      1st Apr 2005
Correct David, I overlooked that one.
:-((
george


"David Candy" <.> wrote in message
news:(E-Mail Removed)...
Though path is concatinated.

--
----------------------------------------------------------

"george" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "Rhino" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Can anyone please explain the difference between the 'system' and 'user'
>> variables in XP (Professional)?
>>
>> I have an environment variable named classpath which occurs in both the
>> 'system' and 'user' (Rhino) variables on my machine. The values of
>> classpath
>> are dramatically different in 'system' than in 'user'. When I am logged
>> on
>> as Rhino, will Windows use the 'user' version of the classpath or does it
>> concatenate the 'user' and 'system' values of classpath??
>>
>> --
>> Rhino
>>
>>

>
> Environment variables are 'evaluated' (ie. they are attributed) in the
> following order:
>
> 1. System variables
> 2. variables defined in autoexec.bat
> 3. User variables
>
> so if classpath is defined in all thre of them, the effectively the value
> defined as user variable will be the resulting one.
>
> They are not concatenated, the value of a given variable is simply set to
> whatever is defined.
>
> There is no difference, it is just a method of having certain variables
> set
> regardless of the user that is logged on (the system variables) and
> variables that can be different depending on the user that is logged on.
>
> hth
>
> george
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What has priority: PATH from User variables or system variables? Sabine Elsner Windows XP General 0 17th Oct 2008 06:46 PM
Environment Variables - System vs User Variable moonhkt Windows XP General 1 7th Aug 2008 02:12 AM
How to create "user environment variables" programatically for a non-logged on user Mel Microsoft Windows 2000 Developer 0 3rd Sep 2005 10:24 PM
User/System environment variables Johnny Microsoft C# .NET 3 12th Dec 2003 04:30 PM
User Environment variables overriden by system env variables Bonny Windows XP Setup 0 11th Jul 2003 06:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:58 PM.