Removes the specified key and all of its subkeys from the OpenVMS
Registry database.
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 TREE key-path key-name
key-path
Specifies the key path.
key-name
Specifies the name of the top level key of the tree to be deleted.
1 – Qualifiers
1.1 /LOG
/LOG
/NOLOG (default)
Displays the names of the subkeys of the top level key as they
are deleted.
1.2 /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.3 /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> CREATE KEY HKEY_USERS\NODE\GUEST
REG> CREATE KEY HKEY_USERS\NODE\GUEST\SUBKEY1
REG> CREATE KEY HKEY_USERS\NODE\GUEST\SUBKEY2
REG> CREATE KEY HKEY_USERS\NODE\GUEST\SUBKEY1\SUBKEY1_2
REG> DELETE TREE HKEY_USERS\NODE GUEST
Deletes the GUEST key and its subkeys SUBKEY1, SUBKEY2, and
SUBKEY1\SUBKEY1_2 from the OpenVMS Registry database.