Windows 10: HKCU and HKU registry records


  1. Posts : 405
    Win10 x64 Pro -2 desktops, 1 laptop
       22 Jan 2017 #1

    HKCU and HKU registry records


    This is a bonehead question about the registry.
    Is the HKCU hive (if that's the right term) dynamically built from HKU\S-1-5-21-... records every time a user logged on?

    I want to make some changes to the registry records of product - copying hundreds of configuration records from an old release set to a new release set. I'm very aware that this may be a big blunder. The records are in both HKCU and my HKU. If I change the HKCU registry records and am blown out of the water, will logging off and back on get me back to the unchanged HKU copy, or does Windows keep the two sets in sync?

    I could (and probably will) export all the records I intend to change, but I could also just uninstall and reinstall the program if it fails to run. But I'm more worried about changing something I did not intend to change - something else in the HKCU hive.

    I will take a complete backup of my system before doing any of this and plan on doing a system restore if I really hose things over, but I would rather have a quicker and more simple recovery.
      My ComputerSystem Spec


  2. Posts : 4,498
    Win10 Home and Pro, Win10 Insider Preview, Win7 Home, Linux Mint
       22 Jan 2017 #2

    I'm not great on the Registry but it is made up of 5 Hives or basically text files that Windows uses to know how to run itself and programs. I'd think those Hives are created when installing Windows and subsequently installing programs and messing with one may be as dire as preventing Windows from running properly if at all. I see those 2 Hives you mentioned are different, some things in one are in subkeys on the other.
    Click image for larger version. 

Name:	Registry1.png 
Views:	25 
Size:	32.7 KB 
ID:	118112
    This is a simplified view of the files when I once backed up the Registry several years ago on a different computer, haven't checked if Win10 has the same [now use a shortcut to create a new Restore Point when I need].
    Click image for larger version. 

Name:	Registry Folder.png 
Views:	1 
Size:	126.6 KB 
ID:	118111
      My ComputerSystem Spec


  3. Posts : 405
    Win10 x64 Pro -2 desktops, 1 laptop
    Thread Starter
       22 Jan 2017 #3

    But obviously "current user" can change from moment to moment if multiple users are signed in on the same computer.

    All of the records I'm (hopefully) going to change are in HKCU\SOFTWARE\... and HKU\S-1-5-21-...\SOFTWARE\. (My SID. I don't know if there is a security issue by displaying it, but I decided not to.) At the moment, the records I'm concerned with are apparently the same in the two hives. (There are 622 of them. I'm not about to check all of 'em.)

    So are you saying that HKCU is not a current user's copy of his/her HKU records? If that is the case, I guess I would have to change both sets and use either Regedit or a system restore to back out the changes if I mess something up.
      My ComputerSystem Spec

  4.    22 Jan 2017 #4

    You can just export the key and then import into the other you dont have to do one at a time. Messing with reg is a suicide mission
      My ComputerSystem Spec


  5. Posts : 405
    Win10 x64 Pro -2 desktops, 1 laptop
    Thread Starter
       22 Jan 2017 #5

    Samuria said: View Post
    You can just export the key and then import into the other you dont have to do one at a time.
    I'm not sure how to map what you've just said into what I'm asking about. I wasn't ever thinking of doing one at a time - not with 622 records.

    First though, I should say that this is mostly a "How does the registry work?" kind of question. I may not follow though on any of this, but I still have the questions.

    And I may have just found something on the web that answers my question:
    The HKEY_CURRENT_USER key is a link to the subkey of HKEY_USERS that corresponds to the user; the same information is accessible in both locations.
    My assumption that there are two sets of records may be wrong. There may just be twos sets of keys for one set of records. That makes sense and clarifies my recovery plans.



    Samuria said: View Post
    Messing with reg is a suicide mission
    Yup. That's why backups are a good idea. Luckily, I' going to be messing with only software registry records for one product. Unless I totally mess up the whole registry I should just be damaging one program.
      My ComputerSystem Spec

  6.    22 Jan 2017 #6

    HKEY_CURRENT_USER is just a link to the key in HKEY_USERS for the current user. If you are working with your own profile you would use HKEY_CURRENT_USER.
      My ComputerSystem Spec


  7. Posts : 405
    Win10 x64 Pro -2 desktops, 1 laptop
    Thread Starter
       22 Jan 2017 #7

    LMiller7 said: View Post
    HKEY_CURRENT_USER is just a link to the key in HKEY_USERS for the current user. If you are working with your own profile you would use HKEY_CURRENT_USER.
    Oh, I knew that I should be working with HKCU. I was just hoping that HKU had a separate copy and that maybe I would get it back just by logging off and back on. Having both sets of keys pointing to same data makes much more sense, but it means I'm more likely to do damage. Oh well.
      My ComputerSystem Spec


 

Related Threads
How to Switch Between HKCU and HKLM Keys in Registry Editor in Windows 10 System configuration information is stored centrally in a hierarchical database called the registry. You can use Registry Editor to add and edit registry keys and values,...
This could be one of the ridiculous post have ever made. But, I have been wondering what will happen if I backup all of the registry keys, reset Windows 10, and then restore the registry keys? Will it affect device driver? Will the device be bricked?
Is there a way to disable this? Recording history in an "InPrivate" window seems like a contradiction in terms, no?
Hi there I'm going to apply to the Guinness Book of Records as I must be the only person on Planet Earth who can't get the GOOGLE CHROME browser to work on the latest version of Windows (W10 PRO X64 with all updates etc) It just sticks forever...
Source: Xbox Breaks Black Friday Records; Windows 10 Gaming Continues to Rise - Xbox Wire
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 01:43.
Find Us