{"id":9292,"date":"2019-05-14T16:50:45","date_gmt":"2019-05-14T11:20:45","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=9292"},"modified":"2023-07-31T18:54:56","modified_gmt":"2023-07-31T13:24:56","slug":"how-to-use-reg-files-registration-entries-windows","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/","title":{"rendered":"How to use .REG files (Registration Entries) in Windows?"},"content":{"rendered":"<p>Many of the articles in this site contain links to <code>.reg<\/code> (Registration entries) and <code>.vbs<\/code> (VBScript) files. In some articles, I post the contents of <code>.reg<\/code> file so that users can make one themselves. This article explains how to create and run <code>.reg<\/code> files in Windows.<\/p>\n<h3><a id=\"import\"><\/a>Create and apply a .reg file<\/h3>\n<p>For example, the following is the <strong>Windows Audio<\/strong> service registry keys for Windows 10. Let&#8217;s say you want to apply the following settings to the registry.<\/p>\n<pre>Windows Registry Editor Version 5.00\r\n\r\n[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Audiosrv]\r\n\"DependOnService\"=hex(7):41,00,75,00,64,00,69,00,6f,00,45,00,6e,00,64,00,70,00,\\\r\n  6f,00,69,00,6e,00,74,00,42,00,75,00,69,00,6c,00,64,00,65,00,72,00,00,00,52,\\\r\n  00,70,00,63,00,53,00,73,00,00,00,00,00\r\n\"Description\"=\"@%SystemRoot%\\\\System32\\\\audiosrv.dll,-201\"\r\n\"DisplayName\"=\"@%SystemRoot%\\\\system32\\\\audiosrv.dll,-200\"\r\n\"ErrorControl\"=dword:00000001\r\n\"FailureActions\"=hex:80,51,01,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,\\\r\n  00,01,00,00,00,60,ea,00,00,01,00,00,00,c0,d4,01,00,01,00,00,00,20,bf,02,00\r\n\"Group\"=\"AudioGroup\"\r\n\"ImagePath\"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\\\r\n  74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\\\r\n  00,76,00,63,00,68,00,6f,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,\\\r\n  6b,00,20,00,4c,00,6f,00,63,00,61,00,6c,00,53,00,65,00,72,00,76,00,69,00,63,\\\r\n  00,65,00,4e,00,65,00,74,00,77,00,6f,00,72,00,6b,00,52,00,65,00,73,00,74,00,\\\r\n  72,00,69,00,63,00,74,00,65,00,64,00,20,00,2d,00,70,00,00,00\r\n\"ObjectName\"=\"NT AUTHORITY\\\\LocalService\"\r\n\"RequiredPrivileges\"=hex(7):53,00,65,00,43,00,68,00,61,00,6e,00,67,00,65,00,4e,\\\r\n  00,6f,00,74,00,69,00,66,00,79,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,\\\r\n  67,00,65,00,00,00,53,00,65,00,49,00,6d,00,70,00,65,00,72,00,73,00,6f,00,6e,\\\r\n  00,61,00,74,00,65,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,\\\r\n  00,00,53,00,65,00,49,00,6e,00,63,00,72,00,65,00,61,00,73,00,65,00,57,00,6f,\\\r\n  00,72,00,6b,00,69,00,6e,00,67,00,53,00,65,00,74,00,50,00,72,00,69,00,76,00,\\\r\n  69,00,6c,00,65,00,67,00,65,00,00,00,00,00\r\n\"ServiceSidType\"=dword:00000001\r\n\"Start\"=dword:00000002\r\n\"Type\"=dword:00000010\r\n\r\n[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Audiosrv\\Parameters]\r\n\"ServiceDll\"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\\\r\n  00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\\\r\n  41,00,75,00,64,00,69,00,6f,00,73,00,72,00,76,00,2e,00,64,00,6c,00,6c,00,00,\\\r\n  00\r\n\"ServiceDllUnloadOnStop\"=dword:00000001<\/pre>\n<p>To apply the above settings to the registry, copy the above lines to Notepad.<\/p>\n<p><strong>Important:<\/strong> When copying the <code>.reg<\/code> file contents to Notepad, if you inadvertently leave a blank line at the top, you&#8217;ll get the <a href=\"https:\/\/www.winhelponline.com\/blog\/error-specified-file-not-registry-script-cannot-import-file-regedit\/\">Cannot import file: The specified file is not a registry script<\/a> error when importing the .reg file. The first line <strong>must<\/strong> always be <code>Windows Registry Editor Version 5.00<\/code> .<\/p>\n<p>Save the file with a .reg extension, say <strong>&#8220;audiosrv.reg&#8221;<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-9295\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-2.png\" alt=\"\" width=\"671\" height=\"303\" \/><\/p>\n<p><em><strong>Note:<\/strong> Always use double-quotes around file names to avoid double-extensions (e.g., <code>audiosrv.reg.txt<\/code>) from being created.<\/em><\/p>\n<p>Once saved the file, right-click on the file and choose <strong>Merge<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9293\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-3.png\" alt=\"\" width=\"433\" height=\"159\" \/><\/p>\n<p>You&#8217;ll see the following prompt:<\/p>\n<p><em><strong>Adding information can unintentionally change or delete values and cause components to stop working correctly. If you do not trust the source of this information in C:\\Users\\ramesh\\Documents\\audiosrv.reg, do not add it to the registry.<\/strong><\/em><\/p>\n<p><em><strong>Are you sure you want to continue?<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-9294\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-4.png\" alt=\"\" width=\"558\" height=\"178\" \/><\/p>\n<p>Click <strong>Yes<\/strong> to continue.<\/p>\n<p>This applies the settings to the registry.<\/p>\n<p>Here is how the <strong>Audiosrv<\/strong> registry key looks like in the Registry Editor (<code>regedit.exe<\/code>):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-9296\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-1.png\" alt=\"\" width=\"780\" height=\"351\" srcset=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-1.png 780w, https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-1-768x346.png 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/p>\n<ul>\n<li>REG_BINARY,\u00a0 REG_EXPAND_SZ, and REG_MULTI_SZ values show up in hexadecimal values when exported to <strong>.reg<\/strong> file.<\/li>\n<li>REG_DWORD and REG_SZ show up as plain-text.<\/li>\n<\/ul>\n<p><em>Microsoft has an excellent guide on this topic. See their KB article <a href=\"https:\/\/support.microsoft.com\/en-in\/help\/310516\/how-to-add-modify-or-delete-registry-subkeys-and-values-by-using-a-reg\" target=\"_blank\" rel=\"noopener noreferrer\">How to add, modify, or delete registry subkeys and values by using a .reg file<\/a> if you want to know in detail about the syntax of .reg files, the data types, etc. To create your own REG file, you can use the instructions and syntax explained in that article.<\/em><\/p>\n<h3><a id=\"export\"><\/a>Create .reg file by exporting it from the Registry Editor<\/h3>\n<p>Using the Registry Editor (<code>regedit.exe<\/code>), use the <strong>Export..<\/strong> option in the File menu to save the currently selected branch to a .reg file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9297\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/reg-file-example-5.png\" alt=\"\" width=\"700\" height=\"277\" \/><\/p>\n<p>The exported .reg file can be used as a backup before modifying entries or deleting a value or key. Also, the .reg file can be transferred to other systems and the settings can be applied by running the file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 .reg file For example, the &#8230; <a title=\"How to use .REG files (Registration Entries) in Windows?\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/\" aria-label=\"Read more about How to use .REG files (Registration Entries) in Windows?\">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":[441],"class_list":["post-9292","post","type-post","status-publish","format-standard","hentry","category-windows","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":9292,"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":19471,"url":"https:\/\/www.winhelponline.com\/blog\/cannot-import-reg-not-all-data-was-successfully\/","url_meta":{"origin":9292,"position":1},"title":"Cannot import .REG file; Not all data was successfully written to registry","author":"Ramesh","date":"October 22, 2020","format":false,"excerpt":"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\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"cannot import .reg file - error accessing registry","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":985,"url":"https:\/\/www.winhelponline.com\/blog\/add-uac-shield-icon-right-click-context-menu-windows-7\/","url_meta":{"origin":9292,"position":2},"title":"How to Add UAC Shield Icon for a Right-Click Menu Item in Windows","author":"Ramesh","date":"January 26, 2010","format":false,"excerpt":"Most users customize the right-click menu by adding additional verbs in the registry in order to launch programs or scripts. Windows 7 (and higher) lets you add the UAC Shield icon for static context menu items. If a verb you add to the right-click menu launches a program which runs\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":235,"url":"https:\/\/www.winhelponline.com\/blog\/error-there-is-no-script-engine-for-file-extension-when-running-vbs-files\/","url_meta":{"origin":9292,"position":3},"title":"[Fix] Can&#8217;t find Script Engine Vbscript, and &#8220;no script engine for .vbs&#8221;","author":"Ramesh","date":"April 27, 2008","format":false,"excerpt":"When you run a VBScript or .msi setup file that runs a VBScript, you may receive one of the following errors: Can't find script engine \"VBScript\" for script C:\\ProgramData\\Microsoft\\Windows\\OFFICEICON.vbs There is no script engine for file extension \".vbs\". This happens if the vbscript.dll module is not registered correctly or the\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9898,"url":"https:\/\/www.winhelponline.com\/blog\/automatically-backup-registry-hives-windows-10\/","url_meta":{"origin":9292,"position":4},"title":"How to Automatically Backup the Entire Registry in Windows","author":"Ramesh","date":"June 22, 2019","format":false,"excerpt":"Every System Restore point or shadow copy maintains a complete backup of the registry hives. However, Windows 10\/11 doesn't automatically create System Restore points every day. Restore Points are created only when installing important updates or drivers. Notwithstanding the System Restore's excellent capabilities, relying upon System Restore as a file\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"backup registry daily or weekly - regidlebackup task","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/06\/registry-backup-task-regidlebackup.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/06\/registry-backup-task-regidlebackup.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/06\/registry-backup-task-regidlebackup.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1401,"url":"https:\/\/www.winhelponline.com\/blog\/file-association-fixes-windows-10\/","url_meta":{"origin":9292,"position":5},"title":"File Association Fixes for Windows 10 (Defaults)","author":"Ramesh","date":"December 30, 2015","format":false,"excerpt":"Here is the list of file association fixes (Windows defaults) for some of the common file types. These registry fixes are applicable for Windows\u00ae 10 only. AVI IMG TXT BAT INF URL BMP JPE\/JPEG\/JPG VBS CHM JS WMA CMD LNK WMV COM MP3 XML EXE PNG ZIP GIF REG Directory\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":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/9292","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=9292"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/9292\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=9292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=9292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=9292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}