Windows - A .bat file to delete a particular registry key

October 2016


I need to create a .bat file that will remove registry a particular registry key, when you double click on it:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{64A3D41B-61A5- 4834-9A42-FDE1C37B0008}]


Create a text file containing the following:
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{64A3D41B-61A5- 4834-9A42-FDE1C37B0008}]
  • Name it as key.reg

Create another text file with the following content:
regedit /s key.reg
  • Name it as delete.bat .
  • Run the second file as admin.

Thanks to kaumune for this tip.

Related :

This document entitled « Windows - A .bat file to delete a particular registry key » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.