Reg_ExistKey
Description
Section titled “Description”Checks if specified key exists
Syntax
Section titled “Syntax”Reg_ExistKey(sHandle, sKey, bMustExist) as Boolean
Parameters
Section titled “Parameters”sHandle (String)
Section titled “sHandle (String)”Registry hive, for example HKLM. For all accepted values, see Registry Functions.
sKey (String)
Section titled “sKey (String)”Subkey path
bMustExist (Boolean)
Section titled “bMustExist (Boolean)”TRUE if the key must exist. If TRUE and the key doesn’t exist, the function returns FALSE.
Return value
Section titled “Return value”gbValue is TRUE if the key exists, otherwise FALSE. Key names aren’t case-sensitive.
The function clears gaValue.
Example
Section titled “Example”If bStatus Then bStatus = Reg_ExistKey("HKLM", "Software\KeyName", False)If bStatus Then bStatus = Job_Writelog("Custom", "gbValue: " & gbValue, bStatus, True)