{"id":19471,"date":"2020-10-22T17:41:06","date_gmt":"2020-10-22T17:41:06","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=19471"},"modified":"2021-04-26T08:06:00","modified_gmt":"2021-04-26T08:06:00","slug":"cannot-import-reg-not-all-data-was-successfully","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/cannot-import-reg-not-all-data-was-successfully\/","title":{"rendered":"Cannot import .REG file; Not all data was successfully written to registry"},"content":{"rendered":"<p>Sometimes, when applying the registry settings using a .reg file, you may get one of the following errors:<\/p>\n<pre class=\"err\">Cannot import file.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.<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19473\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-1.png\" alt=\"cannot import .reg file - error accessing registry\" width=\"558\" height=\"148\" \/><\/p>\n<pre class=\"err\">Cannot import file.reg: Error accessing the registry.<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19474\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-2.png\" alt=\"cannot import .reg file - error accessing registry\" width=\"558\" height=\"133\" \/><\/p>\n<p><em>Registry files (or registration entries) are files that are used to deploy registry settings quickly to other computers. The <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/\">registration entries<\/a> have a file extension <code>.reg<\/code> that can be run by double-clicking or using the <code>reg.exe<\/code> command line. You can also manually import .reg files from the Registry Editor window.<\/em><\/p>\n<p><!--more--><\/p>\n<h2>Cause<\/h2>\n<p>The above errors are caused if the user account that&#8217;s running the .reg file doesn&#8217;t have the necessary write permissions for the registry keys mentioned inside the file. It could be possible that you&#8217;re trying to modify a system-wide setting while logged in as a Limited user.\u00a0If you&#8217;re logged in as administrator and still the error is seen, read below:<\/p>\n<ul>\n<li>The first error &#8220;<code>Not all data was successfully written to the registry<\/code>&#8221; denotes that the system was able to access the registry key, but unable to create or write to the specified registry values.<\/li>\n<li>The other error &#8220;<code>Error accessing the registry<\/code>&#8221; occurs when the system is not able to create or access the registry branch specified in the .reg file.<\/li>\n<\/ul>\n<p>Either way, these errors are caused by missing write permissions for the specified registry keys.<\/p>\n<p>When an error is encountered during the registry import process, Windows would skip to the next line and execute the rest of the instructions in the .reg file, without abruptly stopping the merge\/import process. Let&#8217;s say, the .reg file is configured to write to two different registry locations. If it&#8217;s unable to write to the 1st location, it skips to the next line and attempts to run the rest of the commands.<\/p>\n<div class=\"rp\"><strong>SIMILAR:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/error-specified-file-not-registry-script-cannot-import-file-regedit\/\">[Fix] Cannot import file: The specified file is not a registry script<\/a><\/div>\n<h2>Fix: Error &#8220;Not all data was successfully written to the registry&#8221;<\/h2>\n<p>To prevent the &#8220;Error accessing the registry&#8221;, &#8220;Not all data was successfully written to the registry&#8221; or similar errors from occurring, reapply the registry file from an administrator account.<\/p>\n<p>If the problem persists, from an administrator account, launch the Registry Editor (<code>regedit.exe<\/code>) assign the necessary (write) permissions for the registry keys you&#8217;re trying to modify.<\/p>\n<figure style=\"width: 349px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/reg-own-1.png\" alt=\"Registry Editor - Permissions... context menu option\" width=\"359\" height=\"289\" \/><figcaption class=\"wp-caption-text\">Registry Editor &#8211; Permissions&#8230; context menu option<\/figcaption><\/figure>\n<p>Check out these articles to know how to fix the permissions for a specific registry key:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-take-ownership-of-registry-keys-and-assign-full-permissions\/\">Take Ownership of a Registry Key And Assign Full Permissions<\/a><\/li>\n<li><a href=\"https:\/\/www.winhelponline.com\/blog\/take-ownership-registry-key-permissions-command-line-acl\/\">Take Ownership of Registry Key &amp; Assign Permissions Using Command-line<\/a><\/li>\n<\/ul>\n<p><em>But, for which registry key should I modify the permissions? Read below for the answer.<\/em><\/p>\n<h3>How do you find out which entry in a .reg file is causing the problem?<\/h3>\n<p><strong>Sample Scenario:<\/strong>\u00a0Let&#8217;s say you have a <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/\">.reg file<\/a> that has instructions to modify values in different registry branches. Here&#8217;s an example:<\/p>\n<pre>Windows Registry Editor Version 5.00\r\n\r\n[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\PhotoViewer.FileAssoc.Png\\DefaultIcon]\r\n\"oldicon\"=\"%SystemRoot%\\System32\\imageres.dll,-71\"\r\n\r\n[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\PhotoViewer.FileAssoc.Tiff\\DefaultIcon]\r\n@=\"d:\\icons\\icons.dll,5\"\r\n\"oldicon\"=\"%SystemRoot%\\System32\\imageres.dll,-122\"\r\n\r\n[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\PhotoViewer.FileAssoc.Bitmap\\DefaultIcon]\r\n\"oldicon\"=\"%SystemRoot%\\System32\\imageres.dll,-70\"<\/pre>\n<p>When you run that .reg file, you may get the following error:<\/p>\n<pre class=\"err\">Cannot import file.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.<\/pre>\n<p><em>(Once an error is encountered, Windows skips to the next line and carries out the rest of the instructions in the file.)<\/em><\/p>\n<h4>Narrowing down the registry key<\/h4>\n<p>To know which registry key is causing the problem, track down the <code>ACCESS DENIED<\/code> event(s) using the Process Monitor utility from Microsoft. Process Monitor tracks registry and file system accesses in real-time and logs the result for each event.<\/p>\n<p>For more information, check out the following articles:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.winhelponline.com\/blog\/process-monitor-track-access-denied-registry-file-events\/\">How to Track &#8220;Access Denied&#8221; Registry and File Events Using Process Monitor<\/a><\/li>\n<li><a href=\"https:\/\/www.winhelponline.com\/blog\/process-monitor-track-events-generate-log-file\/\">How to Use Process Monitor to Track Registry and File System Changes<\/a><\/li>\n<\/ul>\n<div class=\"qt\">\n<p><em><strong>Note:<\/strong> If the Registry Editor (which runs the .reg file type by default) knows that certain registry keys can&#8217;t be written to, it doesn&#8217;t attempt to modify those registry values. However, it carries out the registry key (not value) creation operation if the .reg file has instructions to create a new key. In case the operation fails, it would encounter the ACCESS DENIED error.<\/em><em>Whereas the <code>reg.exe<\/code> command-line tool would right away create the key or write to every key\/value mentioned in the .reg file. So, the <code>reg.exe<\/code> tool would be ideal for us to track the ACCESS DENIED events.<\/em><\/p>\n<\/div>\n<p>So, with Process Monitor tracking mode On, open a <a href=\"https:\/\/www.winhelponline.com\/blog\/open-elevated-command-prompt-windows\/\">Command Prompt (admin)<\/a> window and use the following command-line syntax to import a .reg file:<\/p>\n<pre>reg.exe  import  filename_with_path.reg<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19477\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-5.png\" alt=\"cannot import .reg file - error accessing registry\" width=\"699\" height=\"120\" \/><\/p>\n<p>If Process Monitor is currently in tracking mode, it shows the <code>ACCESS DENIED<\/code> entries exactly.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19475\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-3.png\" alt=\"cannot import .reg file - error accessing registry\" width=\"697\" height=\"186\" \/><\/p>\n<p>The error occurs because the <code>PhotoViewer.FileAssoc.Tiff<\/code> branch is owned by the <code>TrustedInstaller<\/code> account and your account doesn&#8217;t have write access to it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19476\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png\" alt=\"cannot import .reg file - error accessing registry\" width=\"700\" height=\"336\" \/><\/p>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/run-program-as-trustedinstaller-locked-registry-keys-files\/\">How to Run Programs as TrustedInstaller to Write to Certain Registry Keys or Files<\/a><\/div>\n<p><em>(Likewise, in a production environment, you may have a locked-down <code>Policies<\/code> registry key. In that case, attempting to write to a subkey under <code>Policies<\/code> would cause the error &#8220;Error accessing the registry&#8221;)<\/em><\/p>\n<p>Now, all you need to do is launch the Registry Editor and <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-take-ownership-of-registry-keys-and-assign-full-permissions\/\">fix the permissions<\/a> for those <a href=\"https:\/\/www.winhelponline.com\/blog\/take-ownership-registry-key-permissions-command-line-acl\/\">registry keys<\/a>. This resolves the &#8220;Cannot import filename.reg. Not all data was successfully written to the registry.&#8221; error.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, when applying the registry settings using a .reg file, you may get one of the following errors: Cannot import file.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. Cannot import file.reg: Error accessing the &#8230; <a title=\"Cannot import .REG file; Not all data was successfully written to registry\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/cannot-import-reg-not-all-data-was-successfully\/\" aria-label=\"Read more about Cannot import .REG file; Not all data was successfully written to registry\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[7],"tags":[191,441],"class_list":["post-19471","post","type-post","status-publish","format-standard","hentry","category-windows","tag-error-messages","tag-registry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":8664,"url":"https:\/\/www.winhelponline.com\/blog\/error-specified-file-not-registry-script-cannot-import-file-regedit\/","url_meta":{"origin":19471,"position":0},"title":"[Fix] Cannot import file: The specified file is not a registry script","author":"Ramesh","date":"April 15, 2019","format":false,"excerpt":"When you try to import a registry file (.reg) by double-clicking it or by using the Import option from within the Registry Editor, the following error occurs. As a result, the .reg file is not imported. Registry Editor Cannot import filename.reg: The specified file is not a registry script. You\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"specified file is not a registry script","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/regedit-import-error-binary-files-blank-space.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/regedit-import-error-binary-files-blank-space.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/regedit-import-error-binary-files-blank-space.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/regedit-import-error-binary-files-blank-space.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":80369,"url":"https:\/\/www.winhelponline.com\/blog\/import-reg-file-as-trustedinstaller\/","url_meta":{"origin":19471,"position":1},"title":"How to Import a .REG file as TrustedInstaller","author":"Ramesh","date":"March 1, 2026","format":false,"excerpt":"Certain registry keys are protected by NTFS permissions and are writable only by TrustedInstaller. In an earlier article, we saw how to launch a program under the TrustedInstaller privileges.\u00a0Let's see step by step how to import a REG file as TrustedInstaller. The benefit of using the TrustedInstaller privileges to modify\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"import .reg file as trustedinstaller","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2026\/03\/import-reg-trustedinstaller.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2026\/03\/import-reg-trustedinstaller.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2026\/03\/import-reg-trustedinstaller.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1113,"url":"https:\/\/www.winhelponline.com\/blog\/exe-files-open-notepad-fix-association\/","url_meta":{"origin":19471,"position":2},"title":"[Fix] .EXE Files Open in Notepad or Other App when Double-clicked","author":"Ramesh","date":"March 9, 2007","format":false,"excerpt":"Summary: Double-clicking an .exe file may open Notepad or any other application, displaying junk characters. On some systems, the Open with dialog may appear when double-clicking .exe files. This article explains how to fix the .exe file association in Windows 10 and 11. Did you accidentally use the Default Programs\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"exe files open in notepad","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2007\/03\/exe_open_notepad.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2007\/03\/exe_open_notepad.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2007\/03\/exe_open_notepad.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":74880,"url":"https:\/\/www.winhelponline.com\/blog\/mp3-metadata-blank-in-explorer\/","url_meta":{"origin":19471,"position":3},"title":"[Fix] MP3 Metadata not displayed in File Explorer","author":"Ramesh","date":"April 20, 2024","format":false,"excerpt":"When you open a folder containing MP3 files, the metadata fields in the Details view of File Explorer may be empty. For instance, the \"Title\", \"Contributing artists\", \"Album\" and other metadata columns may be blank. Even though the MP3 files have embedded metadata ID3 tags, they don't appear in the\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"mp3 metadata columns are empty in explorer","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/04\/mp3-meta-data-blank-explorer-fixed.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/04\/mp3-meta-data-blank-explorer-fixed.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/04\/mp3-meta-data-blank-explorer-fixed.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/04\/mp3-meta-data-blank-explorer-fixed.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":9292,"url":"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/","url_meta":{"origin":19471,"position":4},"title":"How to use .REG files (Registration Entries) in Windows?","author":"Ramesh","date":"May 14, 2019","format":false,"excerpt":"Many of the articles in this site contain links to .reg (Registration entries) and .vbs (VBScript) files. In some articles, I post the contents of .reg file so that users can make one themselves. This article explains how to create and run .reg files in Windows. Create and apply a\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-5.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-5.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-5.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-5.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1825,"url":"https:\/\/www.winhelponline.com\/blog\/error-rename-move-folder-not-exist\/","url_meta":{"origin":19471,"position":5},"title":"Fix: Cannot Rename or Move Folders &#8211; The File or folder does not exist","author":"Ramesh","date":"March 4, 2016","format":false,"excerpt":"When you try to move or rename a folder in Windows 10 or 11, the errors Can't find the specified file, and The file or folder does not exist occur. Also, duplicate icons with no text appear for special folders, namely Documents, Downloads, Music, Pictures, and Videos, under This PC\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"cannot rename folders - windows 11 - folderdescriptions","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/03\/cant-rename-folder-windows-11.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/03\/cant-rename-folder-windows-11.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/03\/cant-rename-folder-windows-11.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/03\/cant-rename-folder-windows-11.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/19471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=19471"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/19471\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=19471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=19471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=19471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}