Skip to main content

1E 8.1 (on-premises)

NativeServices.RegistryDeleteValue

Method

RegistryDeleteValue

Module

NativeServices

Library

Core

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 Name

Short Name

HKEY_CLASSES_ROOT

HKCR

HKEY_CURRENT_CONFIG

HKCC

HKEY_CURRENT_USER

HKCU

HKEY_LOCAL_MACHINE

HKLM

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): The deletion status of the value. "Deleted value" if it has been deleted, else "Key does not exist" if there is no such containing key.

No result is returned if the value did not exist (so it could not be deleted) but the parent key did.

Note

Prior to v4.2 the "Key does not exist" status was "Value does not exist" which was true but not as accurate.

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.