FireDaemon Pro provides a command-line interface (CLI) called FireDaemonCLI to control and manage FireDaemon Pro services. FireDaemonCLI is installed into the FireDaemon Pro installation directory by default (e.g. C:\Program Files\FireDaemon Pro\FireDaemonCLI.exe).
Prerequisites
Before using FireDaemonCLI to run any commands, please note:
- FireDaemonCLI works in two modes: Privileged and Unprivileged. Privileged mode gives you access to all FireDaemonCLI subcommands. Unprivileged mode gives you access to a subset of FireDaemonCLI subcommands. Privileged mode commands are only available when FireDaemonCLI is run in an elevated Command Prompt or PowerShell Console (i.e. launched with "Run as administrator").
- You should be familiar with the Windows command line escape characters before using FireDaemonCLI.
- Any arguments that contain whitespace characters must be enclosed in single or double-quotes (e.g. "C:\Some Path").
Return Codes
Every FireDaemonCLI subcommand returns a numeric value indicating success or failure. At a Command Prompt this is referred to as ERRORLEVEL. At a PowerShell Console this is referred to as LASTEXITCODE. An ERRORLEVEL/LASTEXITCODE of 0 indicates the subcommand completed successfully. A value of 1 indicates the subcommand did not complete successfully. The return numeric value as follows:
At a Command Prompt:
@ECHO OFF
FIREDAEMONCLI <subcommand>
IF %ERRORLEVEL% == 0 (
ECHO "Worked"
) ELSE (
ECHO "Failed"
)
At a PowerShell Console:
.\FireDaemonCLI <subcommand>
if ($LASTEXITCODE -eq 0) {
Write-Host "Worked"
} else {
Write-Host "Failed"
}
Abridged FireDaemonCLI help is available for subcommands in the form FireDaemonCLI help or FireDaemon help <subcommand>.
Redirecting Output
Most FireDaemonCLI subcommands generate text output. This output might be informational or warning messages; or the output from the command itself. This may not be ideal when using the FireDaemonCLI subcommands in scripts. You can suppress text output using the redirection.
For example, at a Command Prompt:
@ECHO OFF
FireDaemonCLI <subcommand> 2>NUL 2>&1
For example, at a PowerShell Console:
[void](.\FireDaemonCLI <subcommand>)
Quoting and Escaping Whitespace
Any argument that contains whitespace characters must be quoted. For example, if when specifying a file name ensure the string is quoted as follows:
"C:\Program Files\Program Name\My Program.exe"
If any argument requires double quotes, these must be escaped with a backslash (\) in Command Prompt and backtick (`) in PowerShell Console.
Command Prompt example:
"-opt1=\"Some Opt\" -opt2=\"Some Other Opt\""
PowerShell Console example:
"-opt1=`"Some Opt`" -opt2=`"Some Other Opt`""
Options and Subcommands
Some FireDaemonCLI Options have both short-form and long-form alternatives. (e.g. -h or --help). Some FireDaemonCLI Subcommands have equivalent options. This is for backward compatibility.

The following table details the available FireDaemonCLI Options and Subcommands.
| Option/Subcommand | Description |
|---|---|
-v --version | Displays the version details of the FireDaemon Pro program along with its Git commit hash. For example: FireDaemon Pro (x64) 6.3.0-0-g959ef0aba |
| help -? -h --help | Displays the command-line help options. When used in conjunction with one of the other subcommands (e.g. FireDaemonCLI help register), it will show more information about what that option does. Always returns 0. |
| register "<licensee>" <key> | Registers FireDaemon Pro. Ensure you include both the required arguments of licensee and key which correlate to Serial Number Name and Serial Number on your FireDaemon Pro order confirmation email. If the licensee contains spaces, ensure you contain the licensee in double quotes. Always returns 0. |
| license | Displays the FireDaemon Pro Registration Information dialog containing the Serial Number Name and serial number. You can enter or update the license information via this dialog. Always returns an 0. |
| install <file spec> [options] Options: --no-restart, --no-reload --update, --edit | Installs or edits a service according to a fully validated XML configuration file named <file spec>. It is optional to specify the .xml extension when specifying the file name. Syntax and validation errors are displayed on standard output (stdout). [options] are as follows:
If the startup mode for the service is set to Automatic or Automatic (Delayed Start), the service will be automatically started. To install a a service definition from standard input (stdin) in UTF-8 encoding, the <file spec> should be specified as an empty string. For example: FireDaemonCLI install "" < servicedef.xml |
create <service> "<file spec>" "<directory path>" "<parameters>" [options] --tag <tag> | Creates and automatically starts the service with minimal parameters.
[options] are as follows:
|
| clone-hot <service> | Clones an existing FireDaemon Pro service where the Service Name is <service>, installs, and starts it based on the existing service's Startup Type. After cloning, the new service will have a Service Name and Display Name prefixed with the string Clone-n-of- and the original Service Short Name is added as a suffix in parenthesis. The number (n) 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 Name of Clone-1-of-Test and Name of Clone-1-of-Test (Test). Later you can modify the prefix and separator from the Global Options dialog. |
| edit <service1/service2/...> [options] Options: --exclude-path-checks --no-restart, --no-reload --tag <tag> --startup-mode, --startup-type <0|1|2|3> --run-like, --sid-type <0|1|3|5> --program "<file spec>" --working-dir "<directory path>" --parameters "<parameters>" --account-name <name> --account-password <password> --upon-exit <0|1|2|3|4|5|6|7> --upon-flap <0|1|2|3> --flap-count <number> --upon-fail <0|1|2|3|4> --fail-count <number> --upon-hang <0|1|2> --hang-period <minutes> --launch-delay <seconds> --schedule-clear --schedule-name --schedule-action %H:%M --schedule-delete | Edits one or more specific attributes of one or more services. A service can be edited regardless of its current state. However, the service must be restarted for the changes to take effect. [options] are as follows:
|
import-all "<file mask>" [options] Options: --no-restart, --no-reload | Imports FireDaemon Pro service definition XML files using a wildcard. <file mask> represents the full path and wildcard to the XML files you wish to import. The file mask can contain special characters including * (any characters) and ? (any character). For example: Note: FireDaemon Pro does not check whether the set of service definitions is named uniquely. If you add the option --no-restart or --no-reload, all imported services remain in the stopped state irrespective of their startup type. |
| uninstall <service> | Uninstalls a service using the service's short name specified when creating the service.Note: Before uninstalling a service, you must first stop the service. |
| uninstall-all | Stops and uninstalls all FireDaemon Pro services. Use this subcommand with care as there is no prompt to confirm the uninstallation of all services. |
export "<service spec>" "<directory path>" [options] Options: --template --matching <svcname|tag> | Exports the selected service definition(s) to XML file(s). The <service spec> can identify service(s) for export by service name or by tag. Use the option --matching to export services that have a specific tag assigned. The default is svcname. The specified service(s) are exported to the <directory path>. To export the template service definition, specify --template. To allow writing a service definition to stdoud in UTF-8 encoding, the file path should be specified as an empty string. For example: FireDaemonCLI export "My Service" "" --matching svcname |
| export-all <file spec> | Exports all FireDaemon Pro service definitions to separate files. Every file is automatically given the file extension: .xml. Use <file spec> to export the service definitions via name and/or numerically. Use %SN% as the service 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 etc. You can combine %SN% and ???. For example: FireDaemon Cli export-all "C:\FD Configs\%SN%???" |
| list-tags | Lists all tags. |
list [<service spec>] [options] Options: --matching tag | Lists all installed FireDaemon Pro services. Always returns 0. If <service spec> is not supplied, all services will be listed. Use --matching tag to list services with a specific tag applied. |
| list-all | Lists all installed FireDaemon Pro services. |
| show-sd <service> [options] Options: --aspect <dacl|sacl> --format <listing|table|table-with-legend|sddl-string> | Displays a service's Security Descriptor (SD). Use --aspect dacl to display the Owner and Discretionary Access Control List (DACL). Use --aspect sacl to display the Owner and System Access Control List (SACL). Use --formatto determine the output format:
|
| reset-sd <service> | Resets a service's DACL to the system default. |
status <service spec> [options] Options: --matching <svcname-wildcard|tag> --pid | Returns the current status of the specified service. The status can be Stopped, Running, or Paused. <service spec> is used to list the status of services by name or by tag. Use the option --matching to list service status by service name pattern or tag. For example:
FireDaemonCLI status M??e* --matching svcname-wildcard 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 (A Program PID). |
control <action> <service spec> [options] Options: --matching <svcname-wildcard|tag> --in-session | Controls individual services. <action> are:
<service spec> is used to list the status of services by name or by tag. Use the option --matching to list service status by service name pattern or tag. --in-session is used to request to start or restart the service in the current user's session. |
| control-all <action> | Controls all services. The available actions are:
|
| session0 <action> | Switches the desktop to Windows session 0. The only action available is <switch>. In session 0 you can view interactive services running in isolation. |
-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. |
