Delete system registry subkeys and values via a .reg file

You might know that on Windows machines using a .reg file you may add, update or delete system registry subkeys and values.

To delete a registry subkey you need to put a hyphen in front of the subkeys path like so

[-HKEY_LOCAL_MACHINE\Software\Test]

To delete a registry value you need to put a hyphen after the equal sign like so

HKEY_LOCAL_MACHINE\Software\Test
"TestValue"=-