How tell which HKEY_USER is me?

  • Thread starter Thread starter Andy
  • Start date Start date
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!!
 
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


How can I tell which HKEY_USER in the registry is me?
 
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?
 
Andy said:
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
 
Andy said:
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
 
Randy Scarborough said:
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.
 
Back
Top