[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Where is Account environment variables kept?

Siegfried Heintze

9/22/2002 7:09:00 PM

Where are the environment variables for each account kept? I found the
system ones and can change those by logging out and back in again.


8 Answers

(Justin Wan[MS])

9/23/2002 10:24:00 AM

0

what operating system are you using?
--------------------
::From: "Siegfried Heintze" <siegfried@heintze.com>
::Newsgroups: microsoft.public.dotnet.framework.sdk
::Subject: Where is Account environment variables kept?
::Date: Sun, 22 Sep 2002 10:09:09 -0700
::Organization: Posted via Supernews, http://www.sup...
::Message-ID: <uorqcpc1tlr7c2@corp.supernews.com>
::X-Priority: 3
::X-MSMail-Priority: Normal
::X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
::X-Mimeole: Produced By Microsoft MimeOLE V6.00.2600.0000
::X-Complaints-To: abuse@supernews.com
::Lines: 4
::Path:
cpmsftngxa08!tkmsftngxs02!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de
!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post
-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
::Xref: cpmsftngxa08 microsoft.public.dotnet.framework.sdk:4237
::X-Tomcat-NG: microsoft.public.dotnet.framework.sdk
::
::Where are the environment variables for each account kept? I found the
::system ones and can change those by logging out and back in again.
::
::
::

This posting is provided "AS IS" with no warranties, and confers no rights.

Siegfried Heintze

10/2/2002 3:33:00 PM

0


"Justin Wan[MS]" <justinew@online.microsoft.com> wrote in message
news:cspM2ptYCHA.1660@cpmsftngxa06...
> what operating system are you using?

Win2000 adv Server.

Is it different for XP and NT?


(Justin Wan[MS])

10/4/2002 1:57:00 AM

0

"User variables for the specific user" is stored c:\documents and
settings\%username%\ntuser.dat.

--------------------
::From: "Siegfried Heintze" <siegfried@heintze.com>
::Newsgroups: microsoft.public.dotnet.framework.sdk
::Subject: Re: Where is Account environment variables kept?
::Date: Wed, 2 Oct 2002 08:33:34 -0600
::Organization: Posted via Supernews, http://www.sup...
::Message-ID: <upm0tvahfqef42@corp.supernews.com>
::References: <uorqcpc1tlr7c2@corp.supernews.com>
<cspM2ptYCHA.1660@cpmsftngxa06>
::X-Priority: 3
::X-MSMail-Priority: Normal
::X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
::X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
::X-Complaints-To: abuse@supernews.com
::Lines: 10
::Path:
cpmsftngxa08!tkmsftngxs01!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de
!news.stealth.net!news.stealth.net!news-out.visi.com!hermes.visi.com!sn-xit-
05!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-
mail
::Xref: cpmsftngxa08 microsoft.public.dotnet.framework.sdk:4331
::X-Tomcat-NG: microsoft.public.dotnet.framework.sdk
::
::
::"Justin Wan[MS]" <justinew@online.microsoft.com> wrote in message
::news:cspM2ptYCHA.1660@cpmsftngxa06...
::> what operating system are you using?
::
::Win2000 adv Server.
::
::Is it different for XP and NT?
::
::
::

This posting is provided "AS IS" with no warranties, and confers no rights.

Siegfried Heintze

10/16/2002 6:34:00 PM

0

That is a surprise to me! I thought they would be in the registry. How do I
write a program that edits them?



(Justin Wan[MS])

10/17/2002 5:55:00 AM

0

you can use autoexec.bat or
modify them in properties page of "my computer".
--------------------
::From: "Siegfried Heintze" <siegfried@heintze.com>
::Newsgroups: microsoft.public.dotnet.framework.sdk
::Subject: Re: Where is Account environment variables kept?
::Date: Wed, 16 Oct 2002 11:34:48 -0600
::Organization: Posted via Supernews, http://www.sup...
::Message-ID: <uqr8puc4kkm330@corp.supernews.com>
::References: <uorqcpc1tlr7c2@corp.supernews.com>
<cspM2ptYCHA.1660@cpmsftngxa06> <upm0tvahfqef42@corp.supernews.com>
<n8TPcD0aCHA.1348@cpmsftngxa08>
::X-Priority: 3
::X-MSMail-Priority: Normal
::X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
::X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
::X-Complaints-To: abuse@supernews.com
::Lines: 5
::Path:
cpmsftngxa08!cppssbbsa01.microsoft.com!news-out.cwix.com!newsfeed.cwix.com!n
ewsfeed1.cidera.com!Cidera!telocity-west!TELOCITY!sn-xit-03!sn-xit-06!sn-pos
t-01!supernews.com!corp.supernews.com!not-for-mail
::Xref: cpmsftngxa08 microsoft.public.dotnet.framework.sdk:4502
::X-Tomcat-NG: microsoft.public.dotnet.framework.sdk
::
::That is a surprise to me! I thought they would be in the registry. How do
I
::write a program that edits them?
::
::
::
::

This posting is provided "AS IS" with no warranties, and confers no rights.

Siegfried Heintze

10/18/2002 3:38:00 PM

0


"Justin Wan[MS]" <justinew@online.microsoft.com> wrote in message
news:n8TPcD0aCHA.1348@cpmsftngxa08...
> "User variables for the specific user" is stored c:\documents and
> settings\%username%\ntuser.dat.
>


That is one ugly file! Is the format documented anywhere? Is editing this
file the best way to programatically alter the environment variables?


(Justin Wan[MS])

10/18/2002 4:19:00 PM

0

ExpandEnvironmentStrings
--------------------
::From: "Siegfried Heintze" <siegfried@heintze.com>
::Newsgroups: microsoft.public.dotnet.framework.sdk
::Subject: Re: Where is Account environment variables kept?
::Date: Fri, 18 Oct 2002 08:38:05 -0600
::Organization: Posted via Supernews, http://www.sup...
::Message-ID: <ur077u9qfm0h6e@corp.supernews.com>
::References: <uorqcpc1tlr7c2@corp.supernews.com>
<cspM2ptYCHA.1660@cpmsftngxa06> <upm0tvahfqef42@corp.supernews.com>
<n8TPcD0aCHA.1348@cpmsftngxa08>
::X-Priority: 3
::X-MSMail-Priority: Normal
::X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
::X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
::X-Complaints-To: abuse@supernews.com
::Lines: 12
::Path:
cpmsftngxa09!cpmsftngxa06!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de
!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post
-01!supernews.com!corp.supernews.com!not-for-mail
::Xref: cpmsftngxa09 microsoft.public.dotnet.framework.sdk:4846
::X-Tomcat-NG: microsoft.public.dotnet.framework.sdk
::
::
::"Justin Wan[MS]" <justinew@online.microsoft.com> wrote in message
::news:n8TPcD0aCHA.1348@cpmsftngxa08...
::> "User variables for the specific user" is stored c:\documents and
::> settings\%username%\ntuser.dat.
::>
::
::
::That is one ugly file! Is the format documented anywhere? Is editing this
::file the best way to programatically alter the environment variables?
::
::
::

This posting is provided "AS IS" with no warranties, and confers no rights.

Manfred Braun

10/26/2002 1:45:00 AM

0

Hi,

this file IS the registry, more directly it is the user's hive, which will
be loaded, when the user loggs in. If you work with NT, go to regedit. Under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
you'll find a list of profiles, which are know to the system. You'll find
the user's SID together with it's username and can map this.

Not all of them are loaded. The system hive and in minimu your profile are
loaded and HKEY_CURRENT_USER is a link to this. You can load an users hive
with REGEDT32 and modifies the environment variables. They are at
HKEY_CURRENT_USER\Environment for a user. If you load another hive, you
cannot do this under the name of HKEY_CURRENT_USER and must must specify a
location and a name. You can then access the environment, make chnages and
unlod the hive. Regard, that this will naturally only work, if the user
is'nt logged in.

Hope, this make some things more clear. With wmi-based methods, you could
write directly to the system-registry and to each loaded hive.

Best regards,
Manfred Braun

(Private)
Mannheim
Germany

mailto:_manfred.braun_@berlin.de
(Remove the anti-spam-underscore to mail me!)

"Siegfried Heintze" <siegfried@heintze.com> wrote in message
news:ur077u9qfm0h6e@corp.supernews.com...
>
> "Justin Wan[MS]" <justinew@online.microsoft.com> wrote in message
> news:n8TPcD0aCHA.1348@cpmsftngxa08...
> > "User variables for the specific user" is stored c:\documents and
> > settings\%username%\ntuser.dat.
> >
>
>
> That is one ugly file! Is the format documented anywhere? Is editing this
> file the best way to programatically alter the environment variables?
>
>