Attach a script file to a file synchronized MID Server
-
- UpdatedFeb 1, 2024
- 3 minutes to read
- Washington DC
- MID Server
You can attach a script file to synchronize to a connected MID Server. Windows Internet Explorer enhanced security blocks downloaded files that it determines are potentially dangerous. However synchronizing the files avoids this security problem.
Before you begin
![]() |
About this task
To get around this issue, use file synchronization. File synchronization requires you to proactively take script files from your instance and save them on the MID Server. The files on the instance and the MID server stay synchronized, but there is no longer any need for the MID Server to download the whole file. File synchronization also protects any updates you make in those script files from being overwritten during the upgrade of an instance.
You can attach multiple files, but the last attached file gets synchronized to the MID Server. If you delete the attachment, the script file becomes inactive, and the synchronized file is deleted from the MID Server.
Procedure
Enable script file synchronization for Windows enhanced security
Windows Internet Explorer enhanced security blocks downloaded files that it determines are potentially dangerous.
Script files synchronized with the MID Server are stored on the instance in the MID Server
Script File [ecc_agent_script_file]
table, which you can access in the module.
When the MID Server first connects to the instance, the instance creates a directory called \scripts in the MID Server root. The instance then creates a parent directory in the path \scripts\<parent name> using definitions from the ecc_agent_script_file table. Finally, the instance creates the script files themselves inside the parent directory using the records from the ecc_agent_script_file table.
The record for the parent directory looks like this:

The instance creates each script file in the parent directory on the MID Server using the record Name from the ecc_agent_script_file table as the file name and the Script field payload as the file contents. A script file record looks like this:

The synchronization of the script file continues to work as if the script was manually added to the form.
See Attach a script file to a file synchronized MID Server for instructions on how to attach a script file.