Dart is a programming language developed by Google that can be used to build web applications as well as standalone applications. A Dart script can be run as a Windows Service using FireDaemon Pro, which allows you to have the script start automatically at boot prior to login, start multiple instances of the script and more. This HOWTO will show you how to set it up. You can also use FireDaemon Fusion to manage FireDaemon and other Windows services via a web browser.

Dart Setup Under FireDaemon Pro

Download the latest version of Dart from the official website.

Install Dart. For the purposes of this installation we will use C:\Program Files\Dart.

Run your Dart script from the command line to ensure it works before setting up FireDaemon Pro. If your script doesn't work from a command line, then it won't work as a service with FireDaemon Pro.

Download and install FireDaemon Pro into the directory of your choice, typically C:\Program Files\FireDaemon.

Next start the FireDaemon GUI from the desktop shortcut. Click on the "Create a new service definition" button in the toolbar (or type Ctrl+N) and enter the information into the fields as you see below. Adjust the paths to suit your installation. Note the required parameters.

  • For Executable, enter the path to the dart.exe file. The default path is C:\Program Files\Dart\dart-sdk\bin\dart.exe
  • For Working Directory, enter the path to the directory that dart.exe is contained in. The default path is C:\Program Files\Dart\dart-sdk\bin
  • For Parameters, enter the path to your Dart script. Be sure to include quotes around the path if it contains spaces.

Now click on the Settings tab. If you DON'T want to see the Dart script running, uncheck the Interact with Desktop check box & select "Hidden" from the "Show Window" dropdown. You can optionally run the Dart script as the user you installed it as. To do this, in the Logon Account field type your username (e.g. Administrator) and then enter the user's password twice in the Password and Confirm fields. You can also change the Process Priority to allocate more CPU time to your Dart script or specify which CPU or core the Dart script will run on (in the case of multi-processor, hyperthreaded or multi-core CPUs).

Now click on the Lifecycle tab. Uncheck Graceful Shutdown as it can slow down the shutdown process. Make sure Console Application is checked.

If you'd like your script to start at specific times, click the Scheduling tab and adjust the schedule to suit your preferences.

Now click OK to save your settings and start your Dart script!