登录脚本 - 参数
您可以使用以下参数:
指 XProtect Smart Client 所连接管理服务器的 URL。
下面的示例将显示 XProtect Smart Client 的登录窗口,其中服务器地址字段为http://ourserver:
Client.exe -ServerAddress="http://ourserver"
默认身份验证类型为 Windows 身份验证(当前用户)。除非使用 AuthenticationType 参数(参见下文)对此进行更改,否则登录窗口会在用户名字段自动显示当前 Windows 用户。
表示特定的用户名。
下面的示例将显示 XProtect Smart Client 登录窗口,其中服务器地址字段为 http://ourserver,用户名字段为 Tommy:
Client.exe -ServerAddress="http://ourserver" -UserName="Tommy"
此参数只与 Windows 身份验证和基本身份验证相关。可使用 AuthenticationType 参数选择身份验证方法。
表示特定的密码。
下面的示例显示 XProtect Smart Client 的登录窗口,其中服务器地址字段为 http://ourserver,用户名字段为 Tommy,密码字段为 T0mMy5Pa55w0rD:
Client.exe -ServerAddress="http://ourserver" -UserName="Tommy" -Password="T0mMy5Pa55w0rD"
此参数只与 Windows 身份验证和基本身份验证相关。可使用 AuthenticationType 参数选择身份验证方法。
表示 XProtect Smart Client 三种身份验证方法中的一种:Windows 身份验证(当前用户)(在启动脚本中称为 WindowsDefault)、Windows 身份验证(在启动脚本中称为 Windows)或基本身份验证(在启动脚本中称为 Simple)。
下面的示例显示 XProtect Smart Client 的登录窗口,其中服务器地址字段为 http://ourserver,身份验证字段为基本身份验证,用户名字段为 Tommy,密码字段为 T0mMy5Pa55w0rD(显示为星号):
Client.exe -ServerAddress="http://ourserver" -UserName="Tommy" -Password="T0mMy5Pa55w0rD" -AuthenticationType="Simple"
如果使用 Windows 身份验证,则示例为:
Client.exe -ServerAddress="http://ourserver" -UserName="Tommy" -Password="T0mMy5Pa55w0rD" -AuthenticationType="Windows"
如果使用 Windows 身份验证(当前用户),则不需要指定 UserName 和 Password 参数,示例应为:
Client.exe -ServerAddress="http://ourserver" -AuthenticationType="WindowsDefault"
表示 .scs 脚本(用于控制 XProtect Smart Client 的脚本类型)的完整路径。
以下是使用 .scs 脚本登录的示例:
Client.exe -Script=c:\startup.scs
使用 .scs 脚本以当前 Windows 用户登录 http://ourserver 的示例:
<ScriptEngine>
<Login>
<ServerAddress>http://ourserver</ServerAddress>
<AuthenticationType>WindowsDefault</AuthenticationType>
</Login>
</ScriptEngine>
可使用大量 XProtect Smart Client 函数调用(请参阅查看函数调用列表)向 .scs 脚本添加更多功能。在以下示例中,我们在脚本中加入一行,以使以前示例中的 .scs 脚本同样可以最小化 XProtect Smart Client 应用程序:
<ScriptEngine>
<Login>
<ServerAddress>http://ourserver</ServerAddress>
<AuthenticationType>WindowsDefault</AuthenticationType>
</Login>
<Script>SCS. Application.Minimize();</Script>
</ScriptEngine>
有效的参数格式为:
{-,/,--}param{ ,=,:}((".')value(",'))
示例:
-UserName Tommy
--UserName Tommy /UserName:"Tommy" /UserName=Tommy -Password 'Tommy'