<<

Contents

Search

>>

 

GET_REGISTRY_VALUE$

 

 

Function

 

 

Syntax:

GET_REGISTRY_VALUE$(<Hkey>,<Subkey>,<Name>)

 

<Hkey>

= <STRING-EXPRESSION>

<Subkey>

= <STRING-EXPRESSION>

<Name>

= <STRING-EXPRESSION>

 

 

Meaning:

Returns under WINDOWS a value of the WINDOWS registry.

 

<Hkey> must contain one of the following root keys:

 

                 HKEY_CLASSES_ROOT
                 HKEY_CURRENT_CONFIG
                 HKEY_CURRENT_USER
                 HKEY_DYN_DATA
                 HKEY_LOCAL_MACHINE
                 HKEY_PERFORMANCE_DATA
                 HKEY_PERFORMANCE_NLSTEXT
                 HKEY_PERFORMANCE_TEXT
                 HKEY_USERS

 

<Subkey> contains the path in <Hkey> , in which the value of <Name> is stored.

 

If successful GET_REGISTRY_VALUE$ returns the value of <Name> as string. If <Name> is a binary object, a string is returned, which contains the values of the bytes of the binary object separated by ";".

 

In the case of an error GET_REGISTRY_VALUE$ return the empty string "" and ERRORTEXT$ contains the error text.

 

If <Name> contains the empty string "", GET_REGISTRY_VALUE$ returns all subkeys of <Subkey> separated by ";".

 

In order to access the WINDOWS registry the JNA package (Java Native Access) has to be installed:

set CLASSPATH =jna-3.5.2.jar;jna-platform-3.5.2.jar;%CLASSPATH%

 

Parameter:

Hkey

Root key

Subkey

Path in <Hkey>

Name

Data element

 

Sample:

USER$ = GET_REGISTRY_VALUE$("HKEY_LOCAL_MACHINE",

           "Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI",

           "LastLoggedOnUser")

 

IF USER$ = ""

THEN ERRORMES = "Error: " + ERRORTEXT$

ENDIF

 

See also:

GET_REGISTRY_VALUE_CLIENT$

DEL_REGISTRY_VALUE

DEL_REGISTRY_VALUE_CLIENT

SET_REGISTRY_VALUE

SET_REGISTRY_VALUE_CLIENT