Deletes a key or value from the registry.
RegDelete ( "keyname" [, "valuename"] )
Parameters
keyname | The registry key to delete. |
valuename | [optional] The valuename to delete. |
Return Value
Success: | Returns 1. |
Special: | Returns 0 if the key/value does not exist. |
Failure: | Returns 2 if error deleting key/value. |
Remarks
A registry key must start with "HKEY_LOCAL_MACHINE" ("HKLM") or "HKEY_USERS" ("HKU") or "HKEY_CURRENT_USER" ("HKCU") or "HKEY_CLASSES_ROOT" ("HKCR") or "HKEY_CURRENT_CONFIG" ("HKCC").
Related
RegRead, RegWrite
Example
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE", "TestKey")