Skip to main content

1E SDK

NativeServices.RegistryGetValue

Method

RegistryGetValue

Module

NativeServices

Library

Core

Action

Get a registry value.

Parameters

Hive (string): The registry hive which has to match one of the following long or short names, ignoring case:

Long Name

Short Name

HKEY_CLASSES_ROOT

HKCR

HKEY_CURRENT_CONFIG

HKCC

HKEY_CURRENT_USER

HKCU

HKEY_LOCAL_MACHINE

HKLM

HKEY_USERS

HKU

Subkey (string): The registry key to look for.

Name (string): The name of the registry value for which to get its value.

Return values

If the specified subkey and name exist, the call will return the following:

  • Name(string): The full path of the registry value.

  • ValueType (string): "REG_DWORD" etc. as appropriate.

  • Value(string): The actual value of an appropriate type, converted to a string if not one already.

If the specified subkey or name does not exist, the call will not return anything but does not return an error ("success, no content").

Example

NativeServices.RegistryGetValue(Hive:"HKLM", Subkey:"software\\vendor", Name:"value23");

The Name returned for this is "HKLM\software\vendor\value23".

Platforms

  • Windows

Notes

REG_MULTI_SZ values are displayed with a '|' between each string.

REG_NONE keys are not supported.

To get a registry value for every user under HKU, use NativeServices.RegistryGetUserValues.