Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

ExportSecuritySystem

  • Last UpdatedOct 29, 2026
  • 2 minute read

This function exports the security system configuration to an encrypted file.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

ExportSecuritySystem

Security

Synchronous

No

Supported

Supported

Not supported

Not supported

Not supported

Syntax

ExportSecuritySystem("strFileName", "strPassword")

strFileName

The file path and name of the file. If the file is located inside the project folder, specify either just the file name or the file path relative to that folder. If the file is located outside the project folder, specify the absolute file path. The file will be saved as an encrypted text file.

Note: Follow the conventions of the target platform for the file path and name, and separators. For example, a file path in Windows starts with a drive letter and uses backward slashes as separators (C:\path\to\file), while a file path in Linux starts at the root directory and uses forward slashes as separators (/path/to/file).

strPassword

The Security System Main Password of the application. This parameter is required if there is a Security System Main Password. If there is no Security System Main Password, do not use this parameter or use an empty string (""). If used, this value will be required to import the configuration file.

Return value

This function returns one of the following values:

Value

Description

-2

Wrong parameter type.

-1

Too many parameters.

0

Could not write security data. This may be due to an incorrect optStrPassword value.

1

File exported successfully.

Notes

The exported security system configuration file can be imported into an application

This function can be called only from scripts executed on the project server. None of the connected clients โ€” not even the client running on the same computer as the project server, because it runs as a separate process on that computer โ€” have the necessary access to the security system. Therefore, generally speaking:

  • It can be called from the following VBScript Interfaces: Startup Script (which is executed when the project itself is run), Script Groups (which are continuously executed by the Background Task), and any Global Procedures called by them; and

  • It cannot be called from the VBScript graphics interfaces, including the Graphics Script (which is executed separately by each client), Screen Scripts (which are attached to individual screens), and Command animations.

For more information, see VBScript Interfaces.

To work around this limitation, create a Script Group that actually calls the function, configure an appropriate tag/expression trigger in the Execution box of the Script worksheet, and then create a project screen that somehow changes the value of that tag/expression. Therefore, when a user on a connected client uses the screen to change the value, the Script Group will be executed on the project server.

Examples

Export the security system configuration to an encrypted file security.txt without having a Security System Main Password:

ExportSecuritySystem("C:\security.txt")

Export the security system configuration to an encrypted file security.txt with a Security System Main Password mypa55w0rd:

ExportSecuritySystem("C:\security.txt", "mypa55w0rd")

In This Topic
Related Links