How to Create a .Reg File for Easy Registry Hacks

There are a lot of important Windows settings you can only change by editing the Registry. For example, in Windows 10, you need to tweak the Registry to bring  your mouse up to maximum speed or stop the Edge Browser from restoring all its tabs after a crash. However, editing the Registry can be time-consuming, as you have to navigate around a huge tree structure to find the right "keys." It also can be risky because you can harm the user experience if you accidentally delete the wrong thing. You certainly wouldn't want a semi-computer-literate user touching the Windows Registry.

However, if there's a registry change that you need to make frequently or you want to share with others, you can build a .Reg  file, which makes any changes you want with a double click. For example, if you want to disable the lock screen on five different computers, you can make a .Reg file to do it and then copy that file onto every PC you own or give it to your octogenarian parents and tell them to run it. Here's how to create a .Reg  file for Windows 7, 8 or 10.

Note: Editing the Windows registry is risky so be careful and, if you're not a moderate-to-advanced user, ask someone else for help.

Using Export in the Registry Editor

The simplest way to create a .Reg file is by making the change you want in the registry editor and then using the editor's export feature. However, this method only works if all the changes are in the same folder.

1. Open the Registry Editor. You can get there by hitting Windows + R, typing "regedit" into the run box and clicking OK.

2. Navigate to the registry key or value that you wish to export and select it. Note that keys are the "folders" in the registry while values are the individual settings within those folders. If you want an entire key copied, highlight the key.

3. Select Export from the File menu.

 4. Name the file and click Save. You must name it with the .reg extension.

Your file will now work for anyone who double clicks it.

Editing a .Reg File

If you want to modify more than just a single key (and its children) or value with your .Reg file, you'll need to modify it with a text editor.

1. Open an existing .Reg or create a blank document using a text editor such as Notepad. 

2.  Make sure the top line reads "Windows Registry Editor Version 5.00" if it does not already.

3. Add the names of registry keys (aka folders) in brackets on their own lines. If a key does not already exist at this location, the .Reg file will create it. For example, enter "[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization]" to create or write-to that key.

4. Enter the values on their own lines beneath the appropriate key name. For example, if we want to set NoLockScreen to DWORD value 1, we write "NoLockScreen"=dword:00000001.

You can enter as many different keys and values as you want. While DWORD values, begin with "dword:" and several zeros, string values are just enclosed in quotation marks.

Note: Different registry values are DWORD, String values or other types such as multi-string value or QWORD (64-bit). The type depends on what Windows or an individual application is looking for. DWORD and String Value are the most common, particularly for registry hacks.

5. Set a value to "-" if you wish to delete the value rather than setting it.

6. Put a "-" in front of a key name if you wish to delete the entire key and all keys and values underneath it. Don't do this unless you're sure you're not deleting something important.

7. Save your file.

Running the .Reg File

Now, anyone who has the file .Reg file can make these registry tweaks by double clicking the file and selecting Yes if prompted.

Windows 10 Performance and Productivity

Avram Piltch
Online Editorial Director
The official Geeks Geek, as his weekly column is titled, Avram Piltch has guided the editorial and production of Laptopmag.com since 2007. With his technical knowledge and passion for testing, Avram programmed several of LAPTOP's real-world benchmarks, including the LAPTOP Battery Test. He holds a master's degree in English from NYU.