登入指令檔 - 參數
您可以使用以下參數:

請參閱 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'