banner

API.get_RegValue method

Retrieves a value from a location in the registry.

Syntax

sValue = window.external.API.get_RegValue(lHKey, sSectionName, KeyName);

Parameters lHKey

Long. One of the predefined HKEY values:

0x80000000 - HKEY_CLASSES_ROOT
0x80000001 - HKEY_CURRENT_USER
0x80000002 - HKEY_LOCAL_MACHINE
0x80000003 - HKEY_USERS          
0x80000004 - HKEY_PERFORMANCE_DATA
0x80000005 - HKEY_CURRENT_CONFIG
0x80000006 - HKEY_DYN_DATA

sSectionName

String. The section in the registry that contains the registry key.

sKeyName

String. The name of the registry key for which you want the value.

Return Values String. The value from the registry.
Applies To window.external.API
Example
HKEY_LOCAL_MACHINE = 0x80000002;
sValue = window.external.API.get_RegValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\MySection", "MyKey");
Comments Use only registry values stored as strings or DWORDs.