Hitachi

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


9.4.2 IsExistRegKey (check whether a registry subkey exists)

Purpose

Checks whether a registry subkey exists and returns True or False.

Syntax
IsExistRegKey(RegKey, SubKey)
Arguments
RegKey

Specify the registry key as one of the following:

  • HKEY_CLASSES_ROOT

  • HKEY_CURRENT_USER

  • HKEY_LOCAL_MACHINE

  • HKEY_USERS

SubKey

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

Description

The IsExistRegKey command checks whether a registry subkey exists. The command returns True if the subkey exists, or False if not.

Example
' If a JP1/Script registry subkey exists,
' check whether it is empty.
Dim regKey, subKey
regKey = HKEY_LOCAL_MACHINE
subKey = "SOFTWARE\WOW6432Node\Hitachi\JP1/Script"
If  IsExistRegKey(regKey, subKey) = True  Then
  isEmp = IsEmptyReg( regKey ,subKey)
  If isEmp = True Then
     MessageBox( "Empty !" )
  Else
     MessageBox ( "Not Empty !" )
  End
End
JP1/Script version

Supported from JP1/Script 01-00.