1.1 Scripting Languages

The Endpoint Security Agent uses the Microsoft Windows Script Host (WSH) to run scripts on a device. All scripts are subject to WSH restrictions. Script content can be authored in either JScript or VBScript language; using multiple languages (JScript and VBScript together) in the same script is not supported.

Standard WSH coding methods are supported, with the following exceptions:

  1. WScript.Echo is not supported because return values can’t be sent back to a parent window that is unavailable. Use the Action.DisplayMessage methods instead (see Section 1.6.6, Display Methods).

  2. Access Shell Objects. Use the following modified nomenclature/call:

    [JScript] 
       Use: 
       var WshShell = new ActiveXObject("WScript.Shell");
       Instead of: 
       var WshShell = WScript.CreateObject ("WScript.Shell");
    
    [VBScript] 
       Use:
       Dim WshShell
       Set WshShell = CreateObject("WScript.Shell")
       Instead of:
       Dim WshShell
       Set WshShell = WScript.CreateObject("WScript.Shell")