Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Why does hkey current user differ from user to user?


Asked by Kieran Hancock on Dec 14, 2021 FAQ



Since the HKEY_CURRENT_USER hive is user specific, the keys and values contained in it will differ from user to user even on the same computer. This is unlike most other registry hives which are global, like HKEY_CLASSES_ROOT, which retain the same information across all users in Windows.
Consequently,
Registry tweaks applied to HKEY_CURRENT_USER will only affect the currently active profile. Most of the time this means the user that is currently logged in.
Also, The HKEY_CURRENT_USER key for each user is found in the registry under the HKEY_USERS hive, under each user’s SID. If you don’t have an easy way to find out what a user’s SID is, what then?
Keeping this in consideration,
However, during the installation process the Default User's hive is loaded into HKEY_CURRENT_USER, which is why during unattended setup you want to import user configuration stuff to HKEY_CURRENT_USER. In XP regedit can now load and unload hives (you used to have to use regedit32).
Furthermore,
For example, if you change the font size in HKEY_USERS\.DEFAULT it doesn't apply to every user, but it will apply to the classic logon window. Basically, every user has what is called a registry hive, stored in %ProfilesDir%\%Username% tuser.dat. This is where all their registry settings are stored.