@REGREAD

Top  Previous  Next

Syntax:

 

@REGREAD( <root key>, <subkey>, <name> {,<default> }

Description:

This function returns data from registry values of the following types: String, Expanded String, Multi, Integer and Binary. Binary data is returned as a series of integers separated by field separator characters. The maximum length of the data returned is determined by OPTION REGBUF.

The <root key> specifies the part of the registry to start from. The permissible values are:

Value

Registry root

ROOT

HCR

HKEY_CLASSES_ROOT\

CURUSER

HCU

HKEY_CURRENT_USER\

LOCAL

HLM

HKEY_LOCAL_MACHINE\

USERS

HU

HKEY_USERS\

DEFAULT

 

HKEY_CURRENT_USER\Software\Commercial Research\VDS\<version>\User Scripts\<scriptname>\ or as specified in OPTION REGKEY

The <subkey> specifies the key required. This may be null if the <rootkey> is DEFAULT.

The <name> specifies the named value required. If <name> is null, the value of the default value of the key is returned.

The optional argument <default> specifies the value to be returned if the specified key does not exist.

Registry values of types STRING, EXPANDSTRING, MULTI, INTEGER, DWORD, LARGEINT, QWORD and BINARY are supported. The EXPANDSTRING type is a string containing tokens representing environment variables. It must be expanded using the @EXPAND function. MULTI strings are strings representing one or more lines of data. Each line is separated by a carriage return character. Multi strings must not contain any blank lines. If present, blank lines will be removed when the string is written to the Registry. INTEGER and DWORD are synonyms: values are returned as a decimal integer. [VDS6] LARGEINT and QWORD are also synonyms, and can handle 64-bit integer values. BINARY values are returned as a string of decimal numbers, one per byte, separated using the current field separator character.

It is recommended that the DEFAULT root key is used for any registry keys created for the use of DialogScript programs.

 

OK:

 

Set to false if the key does not exist, the value type is Unsupported, or if the contents exceed the buffer size. This can be changed using the OPTION REGBUF command.

Example:

%T = @regread(HCU,Software3.0,Top)

 

See also: