How to remove registry keys using REGEDIT

Via the Greek Guru, Peter Kammas:

In case you didn’t already know it, you can use .reg files to also REMOVE registry keys and/or values…

To do so, create a .reg file as follows:

Removing a registry key:

REGEDIT4

[-HKEY_LOCAL_MACHINESOFTWAREDANADAWG]

(note the minus sign before the key name… this will remove the entire key, including subkeys and values, without prompting: so be careful)

Removing a registry value:

REGEDIT4

[HKEY_LOCAL_MACHINESOFTWAREDANADAWG]
"Kennel Patch Install Date"=-

(note the minus sign after the equals sign on the value(s) you want to remove… this will only remove the value(s) specified)

Then it’s just a simple matter of executing the changes with a regedit /s <.reg file>

Bookmark and Share

Related posts:

  1. How can I append the date and time to a file?
  2. Installshield uninstall commands
  3. Patching 10,000 PCs - How I used to do it.
  4. Surfing the seedy side…

blog comments powered by Disqus