Skip to content

Reg_GetExpandString

Gets the value of a registry variable of type expandable string

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

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

Subkey path

Name of variable to read

TRUE if variable must exist

Result will be stored in gsValue.

Note: The value returned is not being interpreted or converted in any way. Meaning that if the function returns the value “%USERPROFILE%\My Documents”, it is not being converted into e.g. C:\Documents and Settings\Administrator\My Documents.

If bStatus Then bStatus = Reg_GetExpandString("HKLM", "Software\KeyName", "ValueName", False)
If bStatus Then bStatus = Job_WriteLog("Custom", "gsValue: " & gsValue, bStatus, True)

Scripting Guidelines

Registry Functions Constants Package Property Variables