Workstation Command Line Flags¶
Warning
Important Version Difference
- Versions before 8.4.313 → only support command line arguments / shortcut flags, and do not use
-D. Example:-exclusiveHost=192.168.2.28:8080
Overview¶
CostOS Workstation can be customized at launch using command line flags. There are two ways to apply them:
-
Default configuration via
CostOS.l4j.ini -
This file already exists in the installation folder next to
CostOS.exe. - Any
-Dflags inside it are automatically applied whenever anyone launches the application. - Useful for setting company-wide or installation-wide defaults.
-
Extra configuration via shortcut or command line
-
If you need specific properties for a particular launch, add them at the end of a shortcut or when running from the command line.
- These override or extend the defaults from the
.inifile.
Editing CostOS.l4j.ini¶
- Location: same folder as
CostOS.exe. - Format: one flag per line.
- Example:
Whenever the application is started, these settings will be applied.
Adding Flags via Shortcut¶
- Exit any running instance of CostOS.
- Right-click your CostOS shortcut → Properties.
- In the Target field, append
-Dflags at the end.
Example:
- Launch CostOS like normal.
Adding Flags via Command Line¶
You can also launch CostOS directly with flags:
Supported Parameters¶
| Flag | Description | Example |
|---|---|---|
| -DexclusiveHost | Sets the server hostname. The login hostname field becomes non-editable. | -DexclusiveHost=192.168.2.28:8080 |
| -DpropertiesFolder | Changes the folder where user properties/configs are saved. Useful for multiple installations. Supports Java system properties (e.g., ${user.home}, ${user.name}) and environment variables (e.g., ${env:APPDATA} or %APPDATA% on Windows). | -DpropertiesFolder=.costos2 -DpropertiesFolder="D:\costosFolder\${user.name}\.costos2" -DpropertiesFolder="%APPDATA%\.costos2" |
| -Dlogfilelocation | Defines the log file location. Supports Java system variables (e.g., ${user.home}, ${user.name}). Also supports environment variables via ${env:VAR_NAME} (e.g., ${env:APPDATA})Default: {install}\bin\logs. | -Dlogfilelocation="logs2" -Dlogfilelocation="\\hostname\logs" -Dlogfilelocation="${user.home}/logs/"-Dlogfilelocation="${env:APPDATA}/CostOS/logs" |
| -DauthenticationMode | Sets the default authentication mode. | -DauthenticationMode=USERNAME_PASSWORD -DauthenticationMode=WINDOWS -DauthenticationMode=WEB |
| -DssoTimeoutSeconds | Maximum time (in seconds) between login start and SSO completion. | -DssoTimeoutSeconds=50 |
| -DbrowserCommand | Command or path to launch the browser for authentication. | -DbrowserCommand=firefox -DbrowserCommand="C:\Program Files\Google\Chrome\Application\chrome.exe" |
| -DpropertiesOSEncryption | Enables OS-based encryption for sensitive data stored in the ui.properties file. The encryption key is generated from the machine’s hardware, ensuring the data can only be decrypted on the same system. ⚠️ Important: If a user profile is moved to another machine with different hardware, decryption will fail. In such cases, set this parameter to false, and the system will use a static encryption key instead. Default value: true | -DpropertiesOSEncryption=true -DpropertiesOSEncryption=false |