Procedure For Deleting Registry Keys, Sub-keys And Value Data Using Registration Entries File

Registration entries files (or a .reg files) are important files which can be used to automatically import and merge registry keys and their corresponding value data to the system registry. Windows OS comes equipped with a built-in handler for automatically handling and processing a .reg file with the help of RegEdit.exe. RegEdit.exe is a user-friendly tool which is used to view and edit System Registry.

Registration entries files are used for adding new registry keys as well as for deleting or removing registry keys or value data from the System Registry. Removing registry keys or value data using Registration entries files is useful when you need to do an undo registry trick for uninstalling an application if the developer has not provided an uninstall script.

You can modify the Registration entries file for removing or deleting registry keys with the help of the procedure mentioned below.

In order to delete or remove a registry key (complete registry branch along with the sub-keys) using a .reg file, you need to simply add a hyphen/ minus sign (-) before the registry path within the registration entries file.

For instance, a typical registration entries file (.reg file) contains the syntax as mentioned below:


[Path in the Registry]


Actual example of .reg file content:

            Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Tech Buzz]


For deleting the entire registry key (HKEY_CURRENT_USER\Software\Tech Buzz) along with its sub-keys and corresponding value data, you need to add a hyphen before it.

For instance,

[-HKEY_CURRENT_USER\Software\Tech Buzz]

For deleting an individual registry value using registration entries file (.reg file) you need to replace “DataType:DataValue” with a hyphen (-) after “equal to” sign (=) that follows the DataItemName within the .reg contents.

For instance,

[HKEY_CURRENT_USER\Software\Tech Buzz]


Any text editor like Notepad can be used to edit the .reg file.