SetRegistry
The SetRegistry function allows a script to write a value to the Geo SCADA User Registry, which comprises part of the logged on user's Geo SCADA Expert User Account (or, with Original WebX, the Windows Registry on the local client machine).
You might be asked to refrain from changing User Registry settings while your Geo SCADA Expert system is in the process of being upgraded.
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 in the database, as part of your Geo SCADA User Registry. (The value is stored as part of your Geo SCADA Expert User Account, rather than being written to the Windows Registry.)
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 a User Account; 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 Geo SCADA User Registry, which comprises part of the logged on user's Geo SCADA Expert User Account in the database (or the Windows Registry on the client machine if using Original WebX). (The Geo SCADA Expert User Registry is used to store name/value pairs in the database; it does not comprise entries in the Windows Registry.) |
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 User Registry in the Geo SCADA Expert Guide to Security. (The registry values are cleared immediately. However, with a user that is currently logged on to Geo SCADA Expert, the registry changes will only become apparent the next time that they log on.)