FireDaemon Pro provides a command-line interface (CLI) to control and manage FireDaemon Pro services.
Before using the command-line interface to run any commands, please note the following:
- FireDaemon Pro requires elevated privileges on Windows Vista, Windows Server 2008, or later. Therefore, you must open the command prompt with Administrator rights.
- You should be familiar with the Windows command line escape characters before using the FireDaemon Pro CLI.
- Any arguments that contain embedded whitespace characters must either be enclosed in double-quotes (for example,
"C:\Some Path"
) or must have an escape character (\) added (for example,C:\Some\ Path
).
Certain command-line options have both short-form and long-form alternatives, for example -h
or --help
to display the command line help information.
Every command-line option returns an ERRORLEVEL of 0 or 1. The ERRORLEVEL determines whether the command was successful (0) or unsuccessful (1) and can be evaluated in batch files.
Option | Description |
---|---|
-h --help | Displays the command-line help options. Always returns an ERRORLEVEL of 1. |
-r --registration | Displays FireDaemon Pro registration information. Always returns an ERRORLEVEL of 0. |
-l --list | Enumerates and lists all installed FireDaemon Pro services. Always returns an ERRORLEVEL of 0. |
-i <File> [edit] [stopped] --install <File> [edit] [stopped] [no-apply] | Installs or reinstalls a service according to a fully validated XML configuration file named <File> . It is optional to specify the .XML extension when specifying the file name.Syntax and validation errors are displayed on standard output (STDOUT). If you specify edit when the service already exists, the service is updated. Otherwise, the service is replaced completely. If the startup mode for the service is set to Automatic or Automatic (Delayed Start), the service will be automatically started. The following additional parameters are also available:
To allow reading a service definition from standard input (STDIN) in UTF-8 encoding, the file path should be specified as an empty string, e.g. --install "" [edit] |
-u <Service> --uninstall <Service> | Uninstalls a service using the Short Name or the Display Name specified when creating the service. Note: Before uninstalling the service, you must first stop the service. |
-v --version | Displays the version details of the FireDaemon Pro program along with its DLL version. For example, FireDaemon Pro (x64) 4.5.20-0-g46d759b8 |
-s --service | Starts FireDaemon Pro in service mode. This option is applicable only when the Service Control Manager is controlling FireDaemon Pro. |
-e --export <Service> <File> [template] | Exports the service definition to an XML file. The service named as <Service> is exported to the file name <File>. If <File> is not specified, the configuration will be exported to standard output (STDOUT). To export the template service definition, specify [template]. To allow writing a service definition to standard output (STDOUT) in UTF-8 encoding, the file path should be specified as an empty string, e.g. --export <Service> "" |
--export-all <Path\Filemask> | Exports all FireDaemon Pro service definitions to separate files. You can use Filemask to export the service definitions via name and/or numerically. Use %SN% as the Short Name and ??? for an incrementing numeric replacement. %SN% and ??? are the replaceable parameters. The number of ? characters will determine the value format. For example ? = 0-9, ?? = 00-99, ??? = 000-999 and so on. You can combine %SN% and ???. For example --export-all n:\some\path\%SN%??? .Every file is automatically given the file extension .xml |
--import-all <Path\Filemask> [stopped] | Imports FireDaemon Pro services definitions. You can use Filemask to import the service definitions. The Filemask can contain the standard DOS wildcards of * and ?. Note: FireDaemon Pro does not check whether the set of service definitions is named uniquely. If you specify stopped, all imported services remain in the stopped state. |
--start <Service> [--in-session] | Starts the named service. The <Service> can be a Short Name or a quoted Display Name given to the service when creating it. For example, "Service Display Name". You can also use wildcards. For example, --start ?ab*. If you specify --in-session, the service will be started in the currently logged in the session instead of Windows session 0, which applies only to Windows Vista, 2008, 7, 8, 2012 or later. Note: You can restart only the services running as LocalSystem. |
--stop <Service> | Stops the named service. The <Service> can be a Short Name or a quoted Display Name given to the service when creating it. You can use wildcards, for example --stop ?ab*. |
--restart <Service> [--in-session] | Stops and then starts the named service. The <Service> can be a Short Name or a quoted Display Name given to the service when creating it. You can also use wildcards. For example, --restart ?ab*. If you specify --in-session, the service will be restarted in the currently logged in session instead of Windows session 0, which applies only to Windows Vista, 2008, 7, 8, 2012, or later. Note: You can restart only the services running as LocalSystem. |
--status <Service> [--pid] | Returns the current status of the named service. The status can be Stopped, Running, or Paused. You can also use wildcards. For example, --status ?ab*. Specify --pid to display the process ID (PID) of the firedaemon.exe process (Service PID) and the PID of the program running under FireDaemon control (App PID). |
--start-all | Starts all currently installed FireDaemon Pro services. |
--stop-all | Stops all currently installed FireDaemon Pro services. |
--restart-all | Stops and then starts all currently installed FireDaemon Pro services. |
--uninstall-all | Uninstalls all currently stopped FireDaemon Pro services. |
--start-all-automatic | Starts all Automatic and Automatic (Delayed Start) FireDaemon Pro services that are currently stopped. |
--kill-all | Immediately terminates all FireDaemon Pro Services and their programs with extreme prejudice. |
--create <Service> <File> <Path> <Params> [nochecks] [stopped] [replace] [sidtype=<0|1|3>] [username=<username> password=<password>] [uponexit=0|1|2|3|4|5|6|7] [smffrequency=<msecs>] | Creates and automatically starts the service with minimal parameters.
Any argument that contains whitespace characters must be quoted. For example, "C:\Program Files\SomeApp\App.exe" If any parameter requires double quotes, these must be escaped with a backslash (\) escape character, for example "-opt1=\"Some Opt\" -opt2=\"Some Other Opt\"" The following additional parameters are also available:
|
--clone-hot <Service> | Clones the existing FireDaemon Pro service. After cloning, the new service will have a Service Short Name that is prefixed with the string Clone-1-of-. The Service Display Name is also prefixed with the string Clone-1-of-, and the original Service Short Name is added as a suffix in parenthesis. The number in the prefix string is set as the lowest available number. For example, cloning a service called Test will create a new service with a Service Short Name of Clone-1-of-Test and a Service Display Name of Clone-1-of-Test (Test). Later you can modify the prefix string from the Options dialog. |
--edit [--validate] <Service> --SidType=<0|1|3> --Program="<File>" --WorkingDir="<Path>" --Parameters="<Params>" --UponProgramExit=<0|1|2|3|4|5|6|7> --UponProgramFlap=<0|1|2|3> --ProgramFlapCount=<n> --UponProgramHang=<0|1|2> --ProgramHangMinutes=<mins> --NoApply --LaunchDelaySeconds=<secs> --ScheduleClear --ScheduleName="<Name>" --ScheduleRestart=%H:%M --ScheduleDelete --AccountName="<domain>\<user>" --AccountPassword="<password>" | Edits one or more specific attributes of the service named <Service> .Any combination of one or more attributes may be edited. No checks are made on the validity of the options, unless --validate is specified. The changes are immediately reflected in the registry. A service can be edited regardless of its current state. However, unless --HotReload or --ScheduleHotReload is specified, the service must be restarted for the changes to take effect. Any argument that contains whitespace characters must be quoted. For example, "C:\Program Files\SomeApp\App.exe" If any parameter requires double quotes, these must be escaped with a backslash (\) escape character, for example "-opt1=\"Some Opt\" -opt2=\"Some Other Opt\"" Note: --validate validates the entire service configuration and not just the modified values. The following additional parameters are also available:
|
--session0 | Switches the desktop to Windows session 0 In session 0 you can view interactive services running in isolation. |
--register "<Name>" <Serial> | Registers FireDaemon Pro.
|
-c --configure --ProductName="<Name>" --ProductShortName="<Name>" --HelpFileName="<File>" --TurnOffSession0Switch[=yes] --TurnOffInSessionCommands[=yes] --TurnOffOnboardingCues[=yes] | [FireDaemon Pro OEM Only] Configures all necessary FireDaemon Pro OEM registry entries and filesystem folders required at runtime along with the help file. For more information, see the FireDaemon Pro OEM Installation and Configuration Guide. |
-d --deconfigure | [FireDaemon Pro OEM Only] Removes all FireDaemon Pro OEM registry entries and empty filesystem folders. Note: Before using this option, all FireDaemon Pro OEM services must be stopped and uninstalled. For more information, see the FireDaemon Pro OEM Installation and Configuration Guide. |