Startup scripting

You can use scripting to control parts or all of the XProtect Smart Client login procedure.

Examples:

Some authentication methods are only available if the XProtect Smart Client user logs in to certain Milestone surveillance systems. For a detailed outline of the features available on your particular system, see the XProtect Product Comparison Chart on: http://www.milestonesys.com.

Parameters

You can use the following parameters:

ServerAddress

Refers to the URL of the server to which XProtect Smart Client connects.

For XProtect Corporate, XProtect Expert, XProtect Professional+, XProtect Express+, and XProtect Essential+, this is the URL of the management server.
For XProtect Professional, XProtect Express, or XProtect Essential it is the URL of the image server.

The following example shows the XProtect Smart Client login window with http://ourserver in the Server address field:

Client.exe -ServerAddress="http://ourserver"

The default authentication type is Windows authentication (current user). Unless you change this, using the AuthenticationType parameter (described in the following section), the login window automatically displays the current Windows user in the User name field.

UserName

Refers to a specific user name.

The following example shows the XProtect Smart Client's login window with http://ourserver in the Server address field, and Tommy in the User name field:

Client.exe -ServerAddress="http://ourserver" -UserName "Tommy"

This parameter is relevant only for Windows authentication and Basic authentication. You use the AuthenticationType parameter to control which authentication method to use.

Password

Refers to a specific password.

The following example shows the XProtect Smart Client's login window with http://ourserver in the Server address field, Tommy in the User name field, and T0mMy5Pa55w0rD in the Password field:

Client.exe -ServerAddress="http://ourserver" -UserName "Tommy" -Password "T0mMy5Pa55w0rD"

This parameter is relevant only for Windows authentication and Basic authentication. You use the AuthenticationType parameter to control which authentication method to use.

AuthenticationType

Refers to one of XProtect Smart Client's three possible authentication methods: Windows authentication (current user) (called WindowsDefault in startup scripts), Windows authentication (called Windows in startup scripts), or Basic authentication (called Simple in the startup scripts).

The following example shows the XProtect Smart Client login window with http://ourserver in the Server address field, Basic authentication selected in the Authentication field, Tommy in the User name field, and T0mMy5Pa55w0rD (masked by asterisks) in the Password field:

Client.exe -ServerAddress="http://ourserver" -UserName "Tommy" -Password "T0mMy5Pa55w0rD" -AuthenticationType Simple

If you use Windows authentication, the example is:

Client.exe -ServerAddress="http://ourserver" -UserName "Tommy" -Password "T0mMy5Pa55w0rD" -AuthenticationType Windows

If you use Windows authentication (current user), the UserName and Password parameters would not be necessary, and the example looks like this:

Client.exe -ServerAddress="http://ourserver" -AuthenticationType WindowsDefault

Script

Refers to a full path to an .scs script (a script type targeted at controlling the XProtect Smart Client).

The following example uses an .scs script to login:

Client.exe -Script=c:\startup.scs

Example of an .scs script for logging in to http://ourserver with the current Windows user:

<ScriptEngine>

  <Login>

    <ServerAddress>http:/ /ourserver</ServerAddress>

    <AuthenticationType>WindowsDefault</AuthenticationType>

  </Login>

</ScriptEngine>

You can use many of the XProtect Smart Client's function calls (see View a list of function calls) to add further functionality to .scs scripts. In the following example, we have added a line so the .scs script from the previous example will also minimize the XProtect Smart Client application:

<ScriptEngine>

  <Login>

    <ServerAddress>http:/ /ourserver</ServerAddress>

    <AuthenticationType>WindowsDefault</AuthenticationType>

  </Login>

  <Script>SCS.Application.Minimize();</Script>

</ScriptEngine>

Format

Valid parameter formats are:

{-,/,--}param{ ,=,:}((".')value(",'))

Examples:

-UserName Tommy

--UserName Tommy

/UserName:"Tommy"

/UserName=Tommy -Password 'Tommy'

© 2018 Milestone Systems A/S