9.4.1 IsEmptyReg (check whether a registry subkey is empty)
- Purpose
-
Checks whether a registry subkey is empty and returns True or False.
You can specify registry subkeys to process as exceptions.
- Syntax
IsEmptyReg(RegKey, SubKey [, ExceptSubKey1, ExceptSubKey2, ...])
- 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.
- ExceptSubKey1 to ExceptSubKey27
-
Specify the registry subkeys to treat as exceptions when the check is performed. Write each exception subkey as a character string or as a variable that stores this value.
- Description
-
The IsEmptyReg command checks whether the specified registry subkey contains any other registry subkeys or entries. The command returns True if the specified registry subkey is empty, or False if not.
If you specify any registry subkeys to treat as exceptions, the command checks for subkeys and entries other than the exception subkey(s).
- Example
' Check whether registry subkey JP1/Script is empty. Dim regKey, subKey, isEmp regKey = HKEY_LOCAL_MACHINE subKey = "SOFTWARE\WOW6432Node\Hitachi\JP1/Script" isEmp = IsEmptyReg(regKey, subKey, "PathName") If isEmp = True Then MessageBox("Empty!") Else MessageBox("Not Empty!") End
- JP1/Script version
-
Supported from JP1/Script 01-00.