Version: 6
restore

Contents

Method

RegistryDeleteValue

ModuleNativeServices
LibraryCore
Action

Delete a registry value.

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
HKEY_USERSHKU

Subkey (string): The registry key to look for.

Name (string): The name of the registry value to delete under the key.

Return values

Status (string): "Deleted value", "Value does not exist", or a registry error message.

Example
 NativeServices.RegistryDeleteValue(Hive:"HKLM", Subkey:"software\\vendor\\test\\test2", Name:"failedTestValue");
Platforms
  • Windows
Notes

 To delete a registry value for every user under HKU, use NativeServices.RegistryDeleteUserValues.