GetRegistry

The GetRegistry function allows a script to retrieve a value from the registry.

From Geo SCADA Expert 2019 onwards, the location from which the value is retrieved varies, depending on the type of client from which the function is triggered and the user that is logged onto that client:

Syntax

GetRegistry (Name, Default)

Description

Reads a value from the registry on the server (or the registry on the client machine if using Original WebX).

Arguments

Name {string}

The Name identifies the registry entry that is to be read by the script. The Name that you enter in your script has to match the name of the required entry in the registry.

Default {string or integer}

The Default value is an optional variant. It is used to define the value that the function will use if the above entry does not exist in the registry.

Returns

Returns a string or integer value from the registry.

Example:

RegValue = GetRegistry("CoreReg", 17)

This sets the RegValue variable (defined earlier in the script) to have the same value as the value stored for the CoreReg entry in the registry. If the script cannot find the specified entry in the registry, the value 17 is used instead; additionally, a CoreReg entry with a value of 17 is created in the registry.

Further Information

If required, an administrator can clear a user's registry settings: see Clear Registry in the Geo SCADA Expert Guide to Security.


Disclaimer

Geo SCADA Expert 2019