Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Use a multiexcerptinclude for Subkey

...

Method

RegistryDeleteUserKey

ModuleNativeServices
LibraryCore
Action


Excerpt
Deletes a given key and all subkeys and values for every user under HKU.


Parameters

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

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

Multiexcerpt include
MultiExcerptNameSubkeyParameter
PageWithExcerptMethod Notes

Return values

Status (string): The deletion status of the key. "Deleted key" if it has been deleted.

Sid (string): SID the key was found under.

Username (string): Domain\Username of the aforementioned SID.

Example


Code Block
languageperl
 NativeServices.RegistryDeleteUserKey(Subkey:"somethingSpecific");


Platforms
  • Windows
Notes

Unlike most registry methods, the 8192 limit is not imposed because doing so would leave the system in an inconsistent state (some users would have the key deleted, others not), and in practice it is highly unlikely that any system would have that many users.

Multiexcerpt include
MultiExcerptNameHKU
PageWithExcerptMethod Notes

Warning
titleWarning

Multiexcerpt include
MultiExcerptNameAdSidToUserName
PageWithExcerptMethod Notes

No output is returned for users for whom the key does not exist, i.e. only keys that were actually deleted are reported.

For consistency with other registry user methods, this would be better named as "RegistryDeleteUserKeys".

...