Cannot import error accessing the registry

Page 4 of 4 FirstFirst ... 234

  1. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #31

    madmax2,

    RickC said:
    Contents of .REG file?

    If you're trying to amend a 'system' hive (i.e. HKLM) then you often need to import as the Administrator, not just as a member of the Administrators group.
    In your own thread.

    By the way, I disagree. with Rick's post but there is no point discussing anything until we know what you want.

    Denis
      My Computer


  2. Posts : 10
    Windows 10
       #32

    I had the same thing happen and I have a feeling that his problem was the UAC permissions on the Registry Directory above where his file was going to be imported to. The fix for me was to add my Admin username to the UAC permissions list of the registry key located 1 level above where my .reg file was going to be imported to. Read below if you find that confusing, I'll go into detail.

    For example:
    I exported a Task Scheduler Task from it's location in the registry:
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser

    I was experimenting with disabling Microsoft Tasks in a VM that I'm setting up. After I exported a backup of the registry entry by right-clicking (in the left pane of Regedit) on the key named "Microsoft Compatibility Appraiser" and choosing Export, when I attempted to re-import this file a little while later I received this same error as the OP.

    This problem threw me for a few minutes, but I knew that Microsoft likes to deny read/write/modify UAC permissions in many areas of the registry and this can (and does) cause problems when a user tries to import a file.


    How this can be fixed:
    Open the .reg file for Edit and look at the registry address, highlight and copy almost the entire address that you see, subtracting the top level.

    For example, in my case the key I exported was this:
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser

    And the key where I needed to copy was this:
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\Application Experience

    Once copied, open Regedit and paste in the navigation bar. Next, look in the left pane of Regedit for the highlighted Key. Right-click this key and choose "Permissions..." Click the Advanced button, and in the window that opens click the "Add" button. Another window will open, click "select a principal." Another window will open, click "Advanced," then click "Find Now." What you will see now is a list of every account that is in your Windows installation. Scroll through this list and choose your Admin user name, or choose the local Admin account that you have access to. Click okay, okay, and then make sure to check the "Full Control" box... and then click Okay, and Okay again. Now that your username has Full Control Permissions, you will probably be able to import the file.

    Note:
    There are some registry directories that will deny you the ability to change UAC permissions, and in that case you will need a tool called PsExec.exe (MS Sysinternals). Close Regedit and run this tool from an Admin command prompt: PsExec.exe -SID %windir%\Regedit.exe , this will launch the editor As SYSTEM which should allow making the changes stated above.
    Last edited by KirkH420; 26 Feb 2022 at 02:16.
      My Computer


 

  Related Discussions
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 00:29.
Find Us




Windows 10 Forums