Home All Groups Group Topic Archive Search About

How tell which HKEY_USER is me?

Author
18 Oct 2006 11:40 AM
Andy
How can I tell which HKEY_USER in the registry is me?

Author
18 Oct 2006 12:24 PM
Will Denny
Hi

What you do you want/need to do with those values?  If you don't know your
way around the Registry - as it would seem - you perhaps shouldn't be in
there in the 1st place!!

--

Will Denny
MS-MVP Shell/User
Please reply to the News Groups


Show quoteHide quote
"Andy" <nom***@nomail.com> wrote in message
news:Xns986080E56210774C1H4@127.0.0.1...
> How can I tell which HKEY_USER in the registry is me?
Are all your drivers up to date? click for free checkup

Author
18 Oct 2006 12:53 PM
Ramesh, MS-MVP
As Will said. You should modify the registry settings only if you know what
you're doing. For better understanding the registry, please read the
following articles:

Description of the Microsoft Windows registry:
http://support.microsoft.com/kb/256986

Registry Hives:
http://windowssdk.msdn.microsoft.com/en-gb/library/ms724877(VS.80).aspx

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


"Andy" <nom***@nomail.com> wrote in message
news:Xns986080E56210774C1H4@127.0.0.1...
How can I tell which HKEY_USER in the registry is me?
Author
18 Oct 2006 3:05 PM
Homer J. Simpson
> How can I tell which HKEY_USER in the registry is me?

Who's "me"?  The user currently logged on?  If that's the case, then that
would be HKEY_CURRENT_USER.

If somebody else, then log in using those credentials, in which case *that*
user's settings will now become HKEY_CURRENT_USER.

You're not trying to change somebody else's registry settings, are you?
Author
18 Oct 2006 3:12 PM
Alec S.
"Andy" <nom***@nomail.com> wrote in message news:Xns986080E56210774C1H4@127.0.0.1...
> How can I tell which HKEY_USER in the registry is me?


This key contains a list of users and their associated SIDs:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

This key contains a list of SIDs, and their associated registry hives:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist

Of course, the correct way to access this information is through API functions, not by reading the registry.


HTH

--
Alec S.
news/alec->synetech/cjb/net
Author
18 Oct 2006 5:30 PM
Randy Scarborough
"Andy" <nom***@nomail.com> wrote in message
news:Xns986080E56210774C1H4@127.0.0.1...
> How can I tell which HKEY_USER in the registry is me?

There are several users on my machine and here is what I did.

One by one I logged on as each user and used Regedit to add one new key to
HKEY_CURRENT_USER for that user.  Specifically, I added a key named "A -
username", with "username" replaced by the user name on whose registry I was
working.  Now, when I go to HKEY_USERS and open one of those long names like
S-1-21-8235xxxxx-xxxxxxxxx-xxxxxxxxx-1004,  the first key in the expanded
list is "A - username", showing me that this is the registry for that user.

This works fine for me

Randy Scarborough
Author
18 Oct 2006 5:55 PM
Alec S.
Show quote Hide quote
"Randy Scarborough" <v***@ibm.net> wrote in message news:eQzbust8GHA.3916@TK2MSFTNGP04.phx.gbl...
>
> "Andy" <nom***@nomail.com> wrote in message
> news:Xns986080E56210774C1H4@127.0.0.1...
> > How can I tell which HKEY_USER in the registry is me?
>
> There are several users on my machine and here is what I did.
>
> One by one I logged on as each user and used Regedit to add one new key to
> HKEY_CURRENT_USER for that user.  Specifically, I added a key named "A -
> username", with "username" replaced by the user name on whose registry I was
> working.  Now, when I go to HKEY_USERS and open one of those long names like
> S-1-21-8235xxxxx-xxxxxxxxx-xxxxxxxxx-1004,  the first key in the expanded
> list is "A - username", showing me that this is the registry for that user.
>
> This works fine for me


Clever, but that's a brute-force method which does not indicate a clear connection between username and SID.  The keys I mentioned
are where Windows stashes the relevant information, but again, it's not the proper way to handle this; using an API function is the
way to do it for anything other than curiosity.


--
Alec S.
news/alec->synetech/cjb/net

Bookmark and Share