REG Files How to Create Edit and Use Them in Windows

REG Files How to Create Edit and Use Them in Windows

REG Files: How to Create, Edit, and Use Them in Windows GA S REGULAR Menu Lifewire Tech for Humans Newsletter! Search Close GO Software & Apps > File Types

How to Create, Edit, and Use REG Files

A Registration file contains data from the Windows Registry

By Tim Fisher Tim Fisher Senior Vice President & Group General Manager, Tech & Sustainability Emporia State University Tim Fisher has more than 30 years' of professional technology experience. He's been writing about tech for more than two decades and serves as the VP and General Manager of Lifewire. lifewire's editorial guidelines Updated on November 7, 2021 Tweet Share Email Tweet Share Email File Types File Types Apps Windows MS Office Linux Google Drive Backup & Utilities Design Cryptocurrency

What to Know

REG files are text files: Create them within a text editor when you save a file with the .reg extension.On Windows, right-click a REG file and open it with Notepad, or the text editor of your choice, to edit it.To use a REG file, simply open it and its contents will be added to the Windows Registry. A file with the .reg file extension is a Registration file used by the Windows Registry. These files can contain hives, keys, and values. These files can be created from scratch in a text editor or can be produced by the Windows Registry when backing up parts of it.

What REG Files Are Used For

There are two major ways to edit the Windows registry: Open Registry Editor and then make registry changes manually. Use a REG file. Think of a REG file as a set of instructions for changing the Windows Registry. Everything in it explains the changes that should be made to the current state of the registry. In other words, and in general, any differences between the REG file being executed and the Windows Registry will result in an addition or removal of whatever keys and values are involved.

Example REG File

For example, here are the contents of a simple 3-line REG file that adds value to a specific key in the registry. In this case, the goal is to add the data necessary for the classic fake Blue Screen of Death: Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kbdhid\Parameters]
"CrashOnCtrlScroll"=dword:00000001
That CrashOnCtrlScroll value isn't included in the registry by default. You could open Registry Editor and create it yourself, manually, or you could build those instructions in a REG file and have it added automatically. Another way to look at these files is to think of them as tools to edit the registry. You can save lots of time when making the same registry changes on multiple computers. Just create one REG file with the changes you want to make and then apply them instantly on multiple PCs.

How to View Change and Build REG Files

These are text-based files. Looking back at the example above, you can clearly see the numbers, path, and letters that make it up. This means you can open one and read everything in it, as well as edit it, using nothing more than a text editor. Windows Notepad is the text editor included in Windows. You can use that program with a REG file by right-clicking or tapping-and-holding the file and choosing Edit. If you like, you can use Windows Notepad every time you need to read or edit the file, but there are other free text editor tools that are easier to work with if you plan on working with these files a lot. Since REG files are nothing more than text files, any text editor can also be used to build a brand new one from scratch. Using our example from above yet again, all you have to do to create the file is open the text editor and then type those instructions exactly as they're written. Next, choose All Files (*.*) as the Save as type, and save it as something memorable, with the .REG extension, of course, like FakeBSOD.REG. It's very easy to accidentally pass over the Save as type option when saving. If you forget to do this and instead save as a TXT file (or any type of file other than REG), you won't be able to use it for registry editing.

Syntax for REG Files

Just like you see in the example from above, all REG files must follow the following syntax in order for Registry Editor to understand them: Windows Registry Editor Version 5.00
[\\]
"Value name"=:
Although neither the contents of a REG file nor the keys in the Windows Registry are case sensitive, some registry values are, so keep that in mind when authoring or editing them.

How to Import Merge Open REG Files

To "open" a REG file could mean opening it for editing or opening it to execute it. If you want to edit one, see the section above. If you want to execute the file (actually do what the file is written to do), keep reading... Executing means to merge it with, or import it to, the Windows Registry. You literally combine the contents of the file with the other registry keys and values that already exist. Whether your intention is to use the file to add, delete, and/or change one or more keys or values, merging/importing is the only way to do it. Always back up the Windows Registry before merging your custom-made or downloaded REG file with it. You can skip this step if you're restoring a previous backup with this file but please don't forget this important step in all other cases. To merge/import it with the Windows Registry, just double-click or double-tap the file. This process is the same no matter the contents—a previously made backup you're restoring, a registry tweak you authored, a downloaded "fix" for a problem, etc. Depending on how your computer is set up, you may see a User Account Control message that you need to accept in order to import the file. If you're sure that the file you've chosen is safe to add to the registry, then select Yes on the prompt that follows to confirm that that's what you want to do. Depending on the changes that the REG file made to the Windows Registry, you may need to restart your computer. If you need more detailed help than the quick outline we have above, see How to Restore the Registry in Windows for a more thorough how-to. That piece is focused more on the restore-from-a-backup process but in reality, it's the same procedure as merging a REG file. Was this page helpful? Thanks for letting us know! Get the Latest Tech News Delivered Every Day Subscribe Tell us why! Other Not enough details Hard to understand Submit More from Lifewire How to Restore the Registry (Windows 11, 10, 8, 7...) What Is a Registry Hive? How to Back up the Windows Registry How to Open Registry Editor in Windows How to Remove Write Protection on a Micro SD Card Windows Registry (What It Is and How to Use It) What Is a Registry Value? What Is a Registry Key? (Definition of Registry Key) How to Change Font in Windows 10 How to Remove the Recycle Bin From a Windows Desktop CCleaner v6.05 Free System Cleaner Review How to Remove Write Protection on Windows 10, 8, and 7 How to Stop the Automatic Installation of Suggested Windows 11 Apps What Is a DAT File? (And How to Open One) ADMX File (What It Is and How to Open One) HKEY_CLASSES_ROOT (HKCR CLSID) Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookies Settings Accept All Cookies
Share:
0 comments

Comments (0)

Leave a Comment

Minimum 10 characters required

* All fields are required. Comments are moderated before appearing.

No comments yet. Be the first to comment!

REG Files How to Create Edit and Use Them in Windows | Trend Now | Trend Now