0

Running regedit as admin in Windows Server 2012 R2, I create a registry export, then try to import this exact same reg file that I just exported, and I get the following message:

Cannot import *****.reg not all data was successfully written to the registry some keys are open by the system or other processes or you have insufficient privileges to perform this operation

Any suggestions? Before I make changes to the registry I want to make sure I have a backup that can actually be restored.

1

There may be keys where even the Administrator has no permission. For example, neither the Registry entry for Dektop Background, HKEY_CLASSES_ROOT\DesktopBackground\Shell\Display, nor its subkeys and values, can be modified directly because the owner is TrustedInstaller.

  • Open Regedit to 'Computer\HKEY_CLASSES_ROOT\DesktopBackground\Shell\Display' by copying the key and pasting into the location bar.

DesktopBackground Reg Key

  • Try to modify a value, e.g. change Position from Bottom to Left.
  • An error message is displayed.

Error editing value

  • Right-click on the Key Display and click Permissions...
  • Click the Advanced button.

Trusted Installer

Note that the Owner of the key is TrustedInstaller. On an individual basis, it is trivial to take ownership of that key and change permissions so that Administrator (or a user) can modify the key in Regedit or load a .REG file for that key. However, if there are many such keys (e.g. you've exported an entire hive), then you'll need to run Regedit as user TrustedInstaller. There are applications such as PowerRun that enable you to run the CMD prompt or Regedit as TrustedInastaller, but double-check any download before using it. Another application for that purpose was flagged by many AV engines at VirusTotal.

Note also that with great power comes great responsibility. It is possible to mangle the Registry sufficiently to require reinstalling Windows. Regrettably, I must admit to learning this from experience. Image your entire drive before making major experiments.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.