Skip to main content

XProtect Smart Client

Temporary legacy fallback for scripts

Last Updated: 2 minute read
Version2026 R2
LanguageEnglish

Use the legacy runtime compilation setting in Client.exe.config as a temporary measure if existing scripts contain constructs not yet supported by Smart Client scripts engine.

Important

Runtime compilation is deprecated and will be removed in a subsequent release. Turn this setting off once your scripts pass validation in Verify script….

By default, XProtect Smart Client uses the Smart Client scripts engine to inspect and run .scs files. If an existing script requires features from the legacy engine, you can temporarily enable runtime compilation in the client configuration.

When runtime compilation is enabled, scripts are compiled and run as arbitrary C# with the active user's permissions, bypassing the allow-list of Smart Client scripts.

Configuration key

The setting is located in the Client.exe.config file in the XProtect Smart Client installation folder:

<add key="StartupScript_AllowRuntimeCompilation" value="false" />

Value

Behavior

false (default)

Uses Smart Client scripts. Scripts that attempt to access files, the registry, processes, reflection, or use unsupported syntax are refused.

true

Enables legacy runtime compilation. Scripts run using the legacy CodeDom compilation engine.

Scripts tab indicators

When StartupScript_AllowRuntimeCompilation is set to true, a status message and warning are displayed on Settings > Scripts:

  • Legacy engine warning:

    “Runtime compilation is enabled (StartupScript_AllowRuntimeCompilation=true). Scripts are compiled and run as C# with the user's rights by the legacy engine, which is deprecated and will be removed. Turn the setting off in Client.exe.config once your scripts pass Verify script.”

  • Compatibility status:

    • "Run by the legacy compiling engine. The validated engine accepts it." — The script executed, and it is also compatible with Smart Client scripts.

    • “Run by the legacy compiling engine. The validated engine would reject it; fix it before the legacy engine is removed.” — The script executed under the legacy engine, but contains syntax or calls that will fail once the legacy engine is removed.