Version: 6
restore

Contents

Method

RegistryDeleteKey

ModuleNativeServices
LibraryCore
Action


Delete a registry key.

Parameters

Hive (string): The registry hive which has to match one of the following long or short names, ignoring case:

Long NameShort Name
HKEY_CLASSES_ROOTHKCR
HKEY_CURRENT_CONFIGHKCC
HKEY_CURRENT_USERHKCU
HKEY_LOCAL_MACHINEHKLM

Subkey (string): The registry key to be deleted.

Return values

Status (string):

  • Deleted key
  • Key does not exist
  • or a registry error message
Example
 NativeServices.RegistryDeleteKey(Hive:"HKLM", Subkey:"software\\1e\\test\\test2");
Platforms
  • Windows
Notes

 To delete keys in the HKEY_USERS hive, use NativeServices.RegistryDeleteUserKey.