Skip to content

Reg_ExistVariable

Checks if specified variable exists

Reg_ExistVariable(sHandle, sKey, sVariable, bMustExist) as Boolean

Registry hive, for example HKLM. For all accepted values, see Registry Functions.

Subkey path

Variable to test existence of

TRUE if the variable must exist. If TRUE and the variable doesn’t exist, the function returns FALSE.

gbValue is TRUE if the variable exists, otherwise FALSE.

The name comparison is case-sensitive: sVariable must match the variable name in the registry exactly.

The function overwrites gaValue with the variable names of the key.

If bStatus Then bStatus = Reg_ExistVariable("HKLM", "Software\KeyName", "ValueName", False)
If bStatus Then bStatus = Job_Writelog("Custom", "gbValue: " & gbValue, bStatus, True)

Scripting Guidelines

Registry Functions Constants Package Property Variables