• why doe registry import into HKCU fail with insufficient privilege

    Home » Forums » AskWoody support » Windows » Windows 10 » Windows 10-other » why doe registry import into HKCU fail with insufficient privilege

    Author
    Topic
    #2427023

    I’m fighting the problem of Windows 10 changing my file associations for .pdf files.  I set it manually myself, and before long Windows changes it back to Edge.  Grrrr!

    After much googling, I have exported HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf but I cannot import it because Win10 says “Cannot import pdf-settings.reg: Not all data was successfully written to the the registry.  Some keys are open by the system or other processes, or you have insufficient privileges to perform this operation.”

    Does anyone know a way around this problem?

    Viewing 5 reply threads
    Author
    Replies
    • #2427051

      Reboot. Run the reg file before running anything else.

      It may be an error in the file. Can you post the contents of the reg file?

      cheers, Paul

      • #2427110

        Thanks for the tips.  There is no “Owner” tab where it should be, so I couldn’t try that approach.

        Every time Edge takes pdf’s, I right click a pdf/Open With/Choose Another App/and select Acrobat and check the box for “always use this app….”.  That works, but only until Edge takes it again anywhere from later that day, next week, or the next windows update.  I see this as a bug in Windows 10 introduced a few years ago, and it’s been there ever since.

        I rebooted, and ran the reg file, and got exactly the same message.  The reg files contents are below.  I’m currently on Version 10.0.19043 Build 19043 (21H1).  A windows update was done a few days ago.  This reg file won’t run regardless of whether Edge or Acrobat is currently the default.

        Windows Registry Editor Version 5.00

        [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf]

        [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithProgids]
        “Acrobat.Document.11″=hex(0):

        [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice]
        “ProgId”=”Acrobat.Document.11”
        “Hash”=”Li6F/3jRDzo=”

         

    • #2427073

      I set it manually myself, and before long Windows changes it back to Edge.  Grrrr!

      I have change PDF file association to Portable Sumatra PDF years ago.
      Windows updates never changed that (currently 21H2)

    • #2427099

      When I all of a sudden couldn’t Save anything to Desktop (Don’t have Permission) And even had to Clk an extra Admin Button to Delete things, I stumbled onto the Win 10 Forums– Take Ownership – Reg mod that Solved my issue = This PC\hi-light Desktop\ Rt Clk\ Take Ownership…..

      Rt Clk a PDF now offers me the Take Ownership option. Any chance this is relevant here? I copied and saved the .reg Files for doing it AND REVERSING it. I’m a regular Macrium Image guy in case of Uh-Oh’s in such matters.

      Take Ownership Mod

      W10 Pro 22H2 / Hm-Stdnt Ofce '16 C2R / Macrium Pd vX / GP=2 + FtrU=Semi-Annual + Feature Defer = 1 + QU = 0

    • #2427226

      It seems you have problems with permissions on the account folders as a more general thing. I’d be tempted to use the (real) administrator account to give the account full control over its folders – I’ve has some situations where altering folder permissions when operating  inside the account runs into unexpected problems, and if there’s a “deny” in the permissions mix, the results, even of using icacls, can also be unexpected and may still  require the (real) administrator account to sort the mess out as unfortunately there isn’t a “reset” method for permissions..

      If it’s registry permissions likewise you can use regini.exe if your brave and regedit isn’t helping, but you can also use the reg load command in the recovery command prompt to mount and modify the registry of an off line Windows installation which sidesteps the local accounts, but of course you will have to change the paths in your registry file to account for the alternate mount point of the hive when using the technique.

      Given your aim appears to be to fix your choices in the file association area, why not set the associations as you intend through settings > Apps & Features, and use DISM to attend to the setting? I’d envisage dism /online and the usual switches should work. If you open the results of the command below (used in an elevated CMD prompt) you’ll be able to see some data from your reg file in the output file assoc.txt it adds to the desktop. (Change the name if that’s a file you have and want to keep!)

      dism /online /Export-DefaultAppAssociations:%userprofile%\desktop\assoc.txt

      the switches concerned are:

      /Import-DefaultAppAssociations – Imports a set of default application
      associations to a Windows image.

      /Export-DefaultAppAssociations – Exports the default application associations
      from a running operating system.

      It’s a known thing with later builds that if you use the registry to change associations (which is something “file opener” malware used to try) Windows spots the change and changes it back – to achieve configuration easily you have to go through settings, or another Windows method for it to work.

    • #2427309

      In addition to DISM, you can also use SetUserFTA to change file associations.

        How To Set Default App File Type Associations in Command Line on Windows 10

      I downloaded SetUserFTA 2 years ago and created a batch file that runs at system startup to set my “personal” file association preferences.

      Microsoft Edge hasn’t “stolen back” any of them since I did that.

      If you’re interested in the history of how SetUserFTA came to be…

        The Kolbicz Blog

    • #2427653

      Thanks for the great tip on SetUserFTA.

      1. I downloaded it via the above links.
      2. Ran it to get progid’s for several extensions.
      3. Put those in config.txt
      4. Created a shortcut to SetUserFTA.exe
      5. Edited the shortcut to add config.txt as a command line option.
      6. Set the shortcut to run as admin, just in case.
      7. It works!  I’m doing the Happy Dance 🙂

      I’m ready for the next time M$ hijacks’ my extensions.

      • #2430573

        Happy to report that today was my first opportunity to use SetUserFTA after the pdf extension had reverted to Edge sometime since yesterday, and it worked perfectly! 🙂

    Viewing 5 reply threads
    Reply To: why doe registry import into HKCU fail with insufficient privilege

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: