Deletes a subkey and its values
#include <WinAPIReg.au3>
_WinAPI_RegDeleteKey ( $hKey [, $sSubKey = ''] )
$hKey | Handle to an open registry key. The access rights of this key do not affect the delete operation. This handle is returned by the _WinAPI_RegCreateKey() or _WinAPI_RegOpenKey() function, or it can be one of the following predefined keys. $HKEY_CLASSES_ROOT $HKEY_CURRENT_CONFIG $HKEY_CURRENT_USER $HKEY_LOCAL_MACHINE $HKEY_USERS |
$sSubKey | [optional] The name of the key to be deleted. It must be a subkey of the key that $hKey identifies, but it cannot have subkeys. |
Success: | 1. |
Failure: | 0 and sets the @error flag to non-zero, @extended flag may contain the system error code. |
A deleted key is not removed until the last handle to it is closed.
_WinAPI_RegCreateKey, _WinAPI_RegOpenKey
Search RegDeleteKey in MSDN Library.