How to Remove or Delete a Registry Key, Subkey and Values with .reg Registration Entries File

Registry registration entries file, which ends in .reg file extension is an useful script that can automate import and merging of registry keys and value data inside the file to system registry, especially in unattended mode. Most Windows operating system has built-in handler that automatically handle and process a file with .reg extension by using RegEdit.exe, a GUI tool which also support command-line interface to search or edit the Windows registry.

While .reg registry registration entries file has been used to add new registry keys into system registry, it can also be used to remove or delete registry key or registry value data. This is useful when user wants to uninstall or undo registry hack, tweak, trick, or patch added via a .reg batch file where developer does not provide an uninstall script. In this case, user can modify the .reg file itself using the following guide to make an removal, deletion or uninstallation .reg registry registration entries file.

Guide to Remove and Delete Registry Entries, Keys, Subkeys or Values via .reg Registration Entries File

To remove and delete a registry key (entire registry tree branch and its sub-keys) with a .reg file, just add a hyphen (- or also known as minus) in front of the registry path (registry tree branch name) in the .reg file.

For example, a typical .reg file has the following syntax:

RegistryEditorVersion

[RegistryPath]
“DataItemName”=”DataType:DataValue”

Actual .reg file content example:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\My Digital Life]
“MDL”=dword:00000001

To delete the whole registry key (i.e. HKEY_CURRENT_USER\Software\My Digital Life) and its whole subkeys and value data, just add a hyphen in front. For example:

[-HKEY_CURRENT_USER\Software\My Digital Life]

To delete a specific or individual registry value with a .reg file, put a hyphen or minus (-) after the equal sign (=) following the DataItemName in the .reg file, replacing DataType:DataValue. For example, to delete the MDL registry value from above example, put a hyphen after the “MDL”= in the .reg file:

[HKEY_CURRENT_USER\Software\My Digital Life]
“MDL”=-

All editing of .reg file can be done with any text editor such as Notepad.


Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

New Articles

Incoming Search Terms for the Article

delete registry key - registry delete - how to remove "IE" key in the registry subkey - force delete registry key vista - on firefox clear all subkeys in software - force delete registry key - delete data key from registry - deleting registry key value data - deleting key registy from vista - how to Delete the registry value. from my c drive - script to delete xp registry key - unused file extensions can't delete from registry - can't+remove+unused file extension+from+registry - delete reg key script - how to remove registration entries - how to remove anti-virus register key from registry - registration entries .key - delete registry key reg file - delete registry key "reg delete" - delete register key - how to script delete registry key - reg file remove value - reg delete example - remove registry key - server 2008 registry key for file extensions - delete registry key batch file - remover registry reg - why is google in my registry keys - bat file to add a subkey to registry - delete subkey - Deleting registry key .reg - delete registry key using script - edit registry+wise+delete reg file - how to remove registry entries with reg file - how to remove license from a registry - how to delete reg keys - how to delete values in registry - how to delete registry keys - how to delete a ie.Ink file - kaspersky registration entry delete - registry entry removal - reg delete examples - registry remove value script - registration entries file types - remove keys in registration entries .reg - script to remove registry key - script to delete registry keys example - syntax remove delete registry key .reg file - uninstall .reg - add registry key batch -