Automate login with scripts
Configure a Smart Client script (.scs) to log in to XProtect Smart Client automatically. Note that external identity providers (IDPs) are not supported for automated script login.
Important
If you specify a password in a script file, the password is stored in plain text. Anyone with read access to the file can view it.
Milestone strongly recommends using Windows authentication (current user) whenever possible, so no credentials are saved in the file.
If you must specify a specific user account, omit the
<Password>tag and use saved credentials locally in XProtect Smart Client instead.Only write passwords directly into the script file when strictly necessary for unattended environments, and protect the file with strict operating system permissions.
Before you begin
You must know the host name or IP address of the XProtect management server.
The account you use (Windows account or basic user) must be configured in XProtect with permissions to log in to the VMS.
Steps
In a text editor, create a text file with the
.scsfile extension (for example,AutoLogin.scs).Add the root
<ScriptEngine>element to the file:<ScriptEngine> </ScriptEngine>
Inside the
<ScriptEngine>root element, add a<Login>block using the configuration that matches your authentication method:To use the currently logged-in Windows user (most secure)
Connects automatically using your active Windows session. No user name or password is included in the file:
ScriptEngine> <Login> <ServerAddress>ServerHostNameOrIP</ServerAddress> <AuthenticationType>WindowsDefault</AuthenticationType> </Login> </ScriptEngine>To use a Windows domain user with saved credentials (safe alternative)
Connects using the user name and the password previously saved locally in XProtect Smart Client for this account:
<ScriptEngine> <Login> <ServerAddress>ServerHostNameOrIP</ServerAddress> <UserName>DOMAIN\Operator1</UserName> <AuthenticationType>Windows</AuthenticationType> </Login> </ScriptEngine>To use a basic user with saved credentials (safe alternative)
Connects using the basic user name and the password previously saved locally in XProtect Smart Client for this account:
<ScriptEngine> <Login> <ServerAddress>ServerHostNameOrIP</ServerAddress> <UserName>Operator1</UserName> <AuthenticationType>Simple</AuthenticationType> </Login> </ScriptEngine>Tip
If there's no saved password on the computer when running the script with saved credentials, the login dialog opens with the server and user name pre-filled. Enter the password, select the Remember password check box, and select Connect. On subsequent launches, the script connects automatically.
To specify Windows domain credentials in the file (not recommended)
<ScriptEngine> <Login> <ServerAddress>ServerHostNameOrIP</ServerAddress> <UserName>DOMAIN\Operator1</UserName> <Password>SecretPassword</Password> <AuthenticationType>Windows</AuthenticationType> </Login> </ScriptEngine>To specify basic-user credentials in the file (not recommended)
<ScriptEngine> <Login> <ServerAddress>ServerHostNameOrIP</ServerAddress> <UserName>Operator1</UserName> <Password>SecretPassword</Password> <AuthenticationType>Simple</AuthenticationType> </Login> </ScriptEngine>
Save the
.scsfile.Run the script.
To run the script immediately: Double-click the
.scsfile in File Explorer, or run the client from a command prompt or shortcut:
Client.exe -Script="C:\Path\To\AutoLogin.scs"
To run the script automatically when Windows starts: Place the
.scsfile (or a shortcut to it) in the Windows Startup folder.
Tip
Administrators can distribute .scs files or desktop shortcuts to operators to standardize startup views or provide quick access to multiple, separate VMS systems without operators having to remember server addresses or site-specific accounts.
Result
XProtect Smart Client opens. The login dialog appears with your connection details pre-filled and automatically initiates the connection. When the user is authenticated, the main workspace opens.