Skip navigation

JSI Tip 2165. How do I delete a key, using regedit in batch?

To delete a key using Regedit, include a minus sign in front of the key path.

Assume you had the following keys and values:




If you wanted to delete the entire Stuff service and the Zip subkey of the ZipZap service, you would submit the following within a .reg file (including the proper header for your version of Regedit):

If the file name was c:\regdel.reg, then:

regedit /s c:\regdel.reg

where the optional /s makes it silent.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.