Function Reference


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.
$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.

Return Value

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

See Also

Search RegDeleteKey in MSDN Library.