ReadValue( )

Action: Reads a registry value and returns it as an ASCII string.
 
Syntax: ReadValue ("subkey", "value")
 
Parameters:

Subkey

Identifies the subkey containing the entry.

Value

Identifies the value whose data you want to discover. To read the default value of a key, specify an empty string as the value name (“”).

Returns:

ASCII representation of the specified registry value.

REG_MULTI_SZ (multi-string) variables are returned with the pipe symbol ( | ) used as the separator between strings. If a string contains a pipe symbol character, it is represented by two pipe symbol characters ( || ).

REG_DWORD type values are returned as a decimal format (base 10) number.

Regardless of the value's data type, this function always returns a string variable type.
 

See Also: AddKey( ), DelKey( ), DelTree( ), ReadType( ), ReadValue( ), WriteValue( )
 
Example:

$Rows = ReadValue("HKEY_CURRENT_USER\Console\Configuration", "WindowRows")
If @ERROR = 0
  ? "Number of window-rows: $Rows"
Endif