Service command line arguments

UnifiedSDK service command line arguments with details

  1. [--help][-?][/?] - print short help about available options.

  2. [--ArgumentsFilePath][-af] "c:\service.cfg" - load parameters from the specified arguments file.

JSON file schema:

{
  "ServiceConfigurationFilePath": string,
  "InstallService": string,
  "UninstallService": "string,
  "ServiceDataPath": string,
  "LogFilePath": string,
  "LogLevel": string,
  "CommandPipeName": string,
  "EventPipeName": string,
  "BinaryToolsSubdirectory": string
  "AllowedClientExeDirectories": string,
  "AllowedClientExePaths": string,
  "AllowedAdminOnly": string,
  "AllowedPipeSddlSids": string,
  "AllowedPipeKnownSids": string,
  "DynamicPipeNamesRegistryKeyPath": string,
}

Or you can use the same names with command line agruments:

{
  "configure": string,
  "install": string,
  "uninstall": "string,
  "data": string,
  "log_file": string,
  "log_level": string,
  "cmd": string,
  "event": string,
  "tools": string,
  "perm_dir": string,
  "perm_exe": string,
  "perm_admin": bool,
  "perm_sddl": string,
  "perm_known": string,
  "dynamic": string,
}

Fill free to combine configuration file with other command line arguments.

E.g. you can put all configuration settings into the file but call service exe with -i argument.

UnifiedSDK.Service.exe -i "ServiceName" -cf "c:\service.cfg"

  1. [-install][-i] "ServiceName" - command to install UnifiedSDK service on machine. During execution will be created file with service executable name with configuration and UnifiedSDK service executable will be registered as windows service with name ServiceName.

Additional optional arguments can be used for detailed configuration:

  • [-configure] "<file path>" - specify path to the configuration file.

Can be used as separate command without [-install][-i] to create a configuration file with specified settings.

  • [-ll] "Error" - minimum logging level. Available values: Trace - low level logs from system components. Debug - raw requests and responses. Information - execution tracing without any details. Error - default value, only execution errors that break standard behavior. Critical - there is no Critical log records and this level can be used to avoid any logging. However, log file will be created.

Note, that we don't encrypt data in logs and Debug level should not be used in PROD.

  • [-lf] "c:\ProgramData\MyApp\logs\service.log" - path to the log file. Archive files will be stored in the subfolder archives. By default: <DATA folder>\logs.

  • [-data][-d] "c:\ProgramData\MyApp\\" - path to the DATA folder, by default c:\ProgramData\UnifiedSDK.Service\. UnifiedSDK service stores some temporary files and logs there.

  • [-cmd][-c] "CommandPipeName" - command pipe name. By default: UnifiedSDKVPNCommandPipe.

  • [-event][-e] "EventPipeName" - event pipe name. By default: UnifiedSDKVPNEventPipe.

  • [-tools][-t] "\Executables" - relative path to the subfolder with tunnel clients executables. If you use this option then all executables should be located into folders \Executables\x64 and \Executables\x86. By default each tunnel client is placed in a separate folder.

  • [-perm_dir][-pd] "<path 1>;<path 2>;<path n>" - specify semicolon-separated folders where can be placed executable files of the client applications. Connections to the command and event pipes from other folders will be rejected.

  • [-perm_exe][-pe] "<path 1>;<path 2>;<path n>" - specify semicolon-separated paths to the client executable files. Connections to the command and event pipes from other executable files will be rejected.

  • [-perm_sddl][-ps] "<sddl 1>;<sddl 2;<sddl n>" - specify security identifiers in the SDDL format to permit connections to the command and event pipes. F. e. S-1-5-18 for SYSTEM account.

  • [-perm_known][-pe] "WellKnownSidType1;WellKnownSidType2;WellKnownSidTypeN" - specify well known security identifiers to permit connections to the command and event pipes. List of available values can be found there: https://learn.microsoft.com/en-us/dotnet/api/system.security.principal.wellknownsidtype?view=net-8.0

  • [-perm_admin][-pa] - flag that enables pipe access only for local administrator, built-in administrator and SYSTEM accounts.

  • [-dynamic][-dpn] "reg path" - activate dynamic pipe names mode and specify registry path to the key where will be stored actual pipe names for this session. New pipe names will be generated every time when SDK service is starting.

  1. [-configure] "<file path>" - create the configuration file by path with specified settings. It uses the same arguments with [-install][-i] command.

  2. [-uninstall][-u] "ServiceName" - stop and remove windows service with name "ServiceName"

Last updated