Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-19298

Regedit : Load/Unload hive incorrect menu

    XMLWordPrintable

Details

    Description

      reactos-bootcd-0.4.15-dev-6826-gdabb3f4-x86-gcc-lin-dbg

      • Open Regedit
      • Go to HKEY_CURRENT_CONFIG\Software
      • File > Unload hive
      • Fails. This menu shall only be available for "HKEY_LOCAL_MACHINE and HKEY_USERS" (see expected result below)

      REGRESSION, guilty commit :  introduced in 0.4.15-dev-243-g4d1cd72 by https://github.com/reactos/reactos/commit/4d1cd723175c25a76c17f58cb93f4e83dfd8881c 
      (See PR discussion about De Morgan's law with katayama_hirofumi_mz : https://github.com/reactos/reactos/pull/2733#discussion_r422676836 )

      (ntoskrnl/config/cmapi.c:2218) Key is not a hive root key!
      err:(win32ss/user/user32/windows/messagebox.c:1048) MessageBox: L"The parameter is incorrect.\r\n" 

      In similar siatuation, action is greyed out in W2K3 Regedit

      Guilty code : https://git.reactos.org/?p=reactos.git;a=blob;f=base/applications/regedit/childwnd.c;hb=6c93f3ca6b95fa5e1806fc29295d3bc8ada979f9#l275

      Expected result :

      See : https://www.serverbrain.org/solutions-2003/loading-and-unloading-hive-files.html

      Loading and unloading hives affects only HKEY_LOCAL_MACHINE and HKEY_USERS, and you can perform these actions only when one of these root keys is selected. Rather than replacing the selected root key, the hive you are loading then becomes a subkey of that root key. HKEY_LOCAL_MACHINE and HKEY_USERS are of course used to build all the logical root keys used on a system, so you could in fact work with any area of the Registry.

      Fixed by regedit_loadfix.patch

      Attachments

        1. image-2023-11-04-13-45-03-210.png
          18 kB
          KRosUser
        2. image-2023-11-04-13-45-52-123.png
          10 kB
          KRosUser
        3. regedit_loadfix.patch
          0.9 kB
          KRosUser

        Issue Links

          Activity

            People

              katayama_hirofumi_mz Katayama Hirofumi MZ
              KRosUser KRosUser
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: