Removes a specified key from the OpenVMS Registry database. The
system does not delete a key if the key has subkeys. Use the
DELETE TREE command if you wish to delete a key and all of its
subkeys.
CAUTION
Deleting a key results in symbolic links not being followed.
This is because the system deletes the key you specify,
even if it has symbolic links.
NOTE
The OpenVMS Registry database predefined keys are reserved
keys and cannot be deleted. These keys are HKEY_USER,
HKEY_LOCAL_MACHINE, and HKEY_CLASSES_ROOT.
This command requires the SYSPRV privilege or the REG$UPDATE
rights identifier.
Format:
DELETE KEY key-path key-name
key-path
Specifies the key path.
key-name
Specifies the name of the key to delete.
1 – Qualifiers
1.1 /WAIT
/WAIT=seconds (default = 90)
/NOWAIT
Specifies the maximum amount of time, in seconds, that you are
willing to wait for command completion. If the Registry server
does not complete the request in the specified interval, REG$CP
returns REG-F-NORESPONSE. The default interval is 90 seconds.
/NOWAIT is equivalent to specifying /WAIT=0, but there may still
be a short wait period.
1.2 /WRITEBEHIND
/WRITEBEHIND
/NOWRITEBEHIND (default)
Specifies when the information can be written to disk.
/WRITEBEHIND specifies that the information can be written to
disk later. /NOWRITEBEHIND specifies write-through operation
(that is, the information must be written to disk immediately).
2 – Example
REG> DELETE KEY HKEY_USERS\NODE GUEST
Deletes the GUEST key from the OpenVMS Registry database.