Registry.GetValueType

number Registry.GetValueType (

number MainKey,

string SubKey,

string Value )

Description

Returns a Registry value's type.

Parameters

MainKey

(number) The main or "root" key containing the sub key. Choose from:

CONSTANT

VALUE

HKEY_CLASSES_ROOT

0

HKEY_CURRENT_CONFIG

1

HKEY_CURRENT_USER

2

HKEY_LOCAL_MACHINE

3

HKEY_USERS

4

SubKey

(string) The sub key containing the value.

Value

(string) The value whose type you want.

Note: To specify the "(Default)" value, use an empty string "" as the value name.

Returns

(number) A numeric constant that corresponds to the Registry value's type:

CONSTANT

VALUE

DESCRIPTION

REG_NONE

0

No defined value type.

REG_SZ

1

A null-terminated string. ("SZ" is short for "string, zero-terminated.")

REG_EXPAND_SZ

2

A null-terminated string that contains environment variables which are to be expanded whenever the Registry value is accessed.

REG_BINARY

3

Raw binary data.

REG_DWORD

4

A 32-bit number.

REG_DWORD_LITTLE_ENDIAN

4

A 32-bit number in little-endian format. This is the same as REG_DWORD.

REG_DWORD_BIG_ENDIAN

5

A 32-bit number in big-endian format.

REG_LINK

6

A Unicode symbolic link. Used internally; applications should not use this type.

REG_MULTI_SZ

7

An array of null-terminated strings, each one terminated by two null characters.

REG_RESOURCE_LIST

8

A device-driver resource list.

REG_FULL_RESOURCE_DESCRIPTOR

9

A list of hardware resources.

REG_RESOURCE_REQUIREMENTS_LIST

10

A list of resources required by a driver.

If the action fails, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

See also: Related Actions