Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: More details about Status

...

Method

RegistryDeleteValue

ModuleNativeServices
LibraryCore
Action


Excerpt
Delete a registry value.


Parameters

Multiexcerpt include
MultiExcerptNameHiveParameterHiveParameterNotHKU
PageWithExcerptMethod Notes

Multiexcerpt include
MultiExcerptNameSubkeyParameter
PageWithExcerptMethod Notes

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"
, or a registry error message
which was true but not as accurate.


Example


Code Block
languageperl
 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.

...