Site icon Winhelponline

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):

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.

Exit mobile version