Environment Variables - System vs. User

Discussion in 'Windows XP General' started by Rhino, Apr 1, 2005.

  1. Rhino

    Rhino Guest

    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
     
    Rhino, Apr 1, 2005
    #1
    1. Advertisements

  2. Rhino

    george Guest

    "Rhino" <> wrote in message
    news:...
    > 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
     
    george, Apr 1, 2005
    #2
    1. Advertisements

  3. Rhino

    Wesley Vogel Guest

    [[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.aspx?scid=kb;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/...all/proddocs/en-us/environment_variables.mspx


    User Environment Variables
    http://msdn.microsoft.com/library/d.../policy/policy/user_environment_variables.asp


    --
    Hope this helps. Let us know.

    Wes
    MS-MVP Windows Shell/User

    In news:,
    Rhino <> 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
     
    Wesley Vogel, Apr 1, 2005
    #3
  4. Rhino

    Rhino Guest

    "Rhino" <> wrote in message
    news:...
    > 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
     
    Rhino, Apr 1, 2005
    #4
  5. Rhino

    David Candy Guest

    Though path is concatinated.

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

    "george" <> wrote in message news:...
    >
    > "Rhino" <> wrote in message
    > news:...
    >> 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
    >
    >
    >
     
    David Candy, Apr 1, 2005
    #5
  6. Rhino

    george Guest

    Correct David, I overlooked that one.
    :-((
    george


    "David Candy" <.> wrote in message
    news:...
    Though path is concatinated.

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

    "george" <> wrote in message
    news:...
    >
    > "Rhino" <> wrote in message
    > news:...
    >> 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
    >
    >
    >
     
    george, Apr 1, 2005
    #6
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bonny
    Replies:
    0
    Views:
    791
    Bonny
    Jul 11, 2003
  2. Johnny

    User/System environment variables

    Johnny, Dec 12, 2003, in forum: Microsoft C# .NET
    Replies:
    3
    Views:
    212
    Johnny
    Dec 12, 2003
  3. Mel
    Replies:
    0
    Views:
    628
  4. moonhkt

    Environment Variables - System vs User Variable

    moonhkt, Aug 7, 2008, in forum: Windows XP General
    Replies:
    1
    Views:
    537
    John John (MVP)
    Aug 7, 2008
  5. Sabine Elsner
    Replies:
    0
    Views:
    350
    Sabine Elsner
    Oct 17, 2008
Loading...

Share This Page