SetRegistry
The SetRegistry function allows a script to write a value to the registry.
From Geo SCADA Expert 2019 onwards, the location at which the value is stored varies, depending on the type of client from which the function is triggered and the user that is logged onto that client:
- To use the function on a ViewX or Virtual ViewX client, you have to be logged on via a Geo SCADA Expert User Account. When you trigger the function, the value gets stored on the server, in the registry of that Geo SCADA Expert User Account.
You cannot use the function when accessing the database as the Guest User account, or when logged on as the Super User, on a ViewX Client. If you do, the value will only be cached and not get written to the registry; as such the value will only be retained temporarily.
- With Original WebX, the value gets stored in the registry on the local client machine. The registry entry is specific to the Windows user account that is currently logged on to that client machine. The location is typically:
HKEY_CURRENT_USER\Software\Schneider Electric\ClearSCADA\ViewX/Mimics
LOSS of data
Syntax |
SetRegistry (Name, Value) |
Description |
Writes a value to the registry on the server (or the registry on the client machine if using Original WebX). |
Arguments |
Name {string} This identifies the registry entry that is to be written to by the script. The Name used in your script has to match the name of the required entry in the registry.
Value {string or integer} The value that is to be written to, and associated with, the above registry entry. |
Returns |
None. |
Example:
SetRegistry "CoreReg", 58
This writes the value 58 to the CoreReg registry entry.
Further Information
If required, an administrator can clear a user's registry settings: see Clear Registry in the Geo SCADA Expert Guide to Security.