How to use .REG files (Registration Entries) in Windows?

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 following is the Windows Audio service registry keys for Windows 10. Let’s say you want to apply the following settings to the registry.

Windows Registry Editor Version 5.00

"ObjectName"="NT AUTHORITY\\LocalService"


To apply the above settings to the registry, copy the above lines to Notepad.

Important: When copying the .reg file contents to Notepad, if you inadvertently leave a blank line at the top, you’ll get the Cannot import file: The specified file is not a registry script error when importing the .reg file. The first line must always be Windows Registry Editor Version 5.00 .

Save the file with a .reg extension, say “audiosrv.reg”

Note: Always use double-quotes around file names to avoid double-extensions (e.g., audiosrv.reg.txt) from being created.

Once saved the file, right-click on the file and choose Merge.

You’ll see the following prompt:

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.

Are you sure you want to continue?

Click Yes to continue.

This applies the settings to the registry.

Here is how the Audiosrv registry key looks like in the Registry Editor (regedit.exe):

  • REG_BINARY,  REG_EXPAND_SZ, and REG_MULTI_SZ values show up in hexadecimal values when exported to .reg file.
  • REG_DWORD and REG_SZ show up as plain-text.

Microsoft has an excellent guide on this topic. See their KB article How to add, modify, or delete registry subkeys and values by using a .reg file 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.

Create .reg file by exporting it from the Registry Editor

Using the Registry Editor (regedit.exe), use the Export.. option in the File menu to save the currently selected branch to a .reg file.

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.

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded in 2005.

6 thoughts on “How to use .REG files (Registration Entries) in Windows?”

  1. This worked great. Thanks!
    Clear explanations. Solid examples. I liked the inclusion of importing from text files as well as exporting from Registry Editor.
    I shared on FB and twitter 🙂

  2. I merged it into the registry, it didn’t work for me. any more suggestions? I have tried everything on the internet regards john

    trying to get image preview in windows 10

  3. An Article DATE should be provided here and a REVERSE registry edit as well.

    What were your rewards for?



Leave a Reply