Skip to content

Reg_EnumVariable

Enumerates the variables (value names) of a registry key.

Reg_EnumVariable(sHandle, sKey, bMustExist) as Boolean

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

Subkey path

TRUE if the key must exist. If TRUE, the function also returns FALSE when the key has no variables.

The variable names are stored in gaValue as an array. gbValue is TRUE if at least one variable is found, otherwise FALSE.

If bStatus Then bStatus = Reg_EnumVariable("HKLM", "Software\KeyName", False)
If bStatus And IsArray(gaValue) Then
For index = LBound(gaValue) to UBound(gaValue)
bStatus = Job_WriteLog("Custom", "Index #" & index & ": " & cStr(gaValue(index)), bStatus, True)
Next
End If

Scripting Guidelines

Registry Functions Constants Package Property Variables