Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Note about Subkey Name

...

Method

RegistryDeleteKey

ModuleNativeServices
LibraryCore
Action


Excerpt
Delete a registry key.


Parameters

Multiexcerpt include
MultiExcerptNameHiveParameterNotHKU
PageWithExcerptMethod Notes

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

Note
"Subkey" is a misleading name - just "Key" would be better.


Return values

Status (string)

  • If the key was successfully deleted, set to "Deleted key".
  • If the key does not exist, nothing is returned, i.e. success no content.
  • If the parent key does not exist, set to (slightly misleadingly) "Key does not exist".

If some other registry error occurs, the method fails with a descriptive message.

Example


Code Block
languageperl
 NativeServices.RegistryDeleteKey(Hive:"HKLM", Subkey:"software\\1e\\test\\test2");


Platforms
  • Windows
Notes

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

...