Hitachi

JP1 Version 13 JP1/Script Description and Reference (For Windows Systems)


9.2.4 RegDeleteKey (delete a registry subkey)

Purpose

Deletes a registry subkey.

Syntax
RegDeleteKey(RegKey, SubKey, DelKey)
Arguments
RegKey

Specify the registry key as one of the following:

  • HKEY_CLASSES_ROOT

  • HKEY_CURRENT_USER

  • HKEY_LOCAL_MACHINE

  • HKEY_USERS

If you specify a registry key other than HKEY_CURRENT_USER, execute the script file as a user who has administrator permissions. For details, see 1.8.3 Effect of the executing user on command behavior.

SubKey

Specify the registry subkey as a character string or as a variable that stores this value.

DelKey

Specify the key to be deleted as a character string or as a variable that stores this value.

Description

The RegDeleteKey command deletes a key in a specified registry subkey, and all the subkeys and entries included in that key. The command returns True on successful execution, or False if an error occurs.

Example
RegDeleteKey(HKEY_CURRENT_USER   _
              ,"Software\Hitachi\Script", "Debug")
JP1/Script version

Supported from JP1/Script 01-00.