Manfred Braun
10/26/2002 1:45:00 AM
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?
>
>