How To Run ActivePython as a Windows Service with FireDaemon
ActivePython is a widely-used Python distribution. A Python script can be run as a Windows Service using FireDaemon. FireDaemon will allow you to have the script start automatically at boot prior to login, allow you to start multiple instances of the script and so forth. This HOWTO will show you how set it up. You can also use Trinity or PanelDaemon to manage FireDaemon and other Windows services via a web browser.
By default ActivePython installs to "C:\Python26" so for the purposes of this HOWTO, we will use that directory.
Install FireDaemon Pro into the directory of your choice (typically C:\Program Files\FireDaemon). FireDaemon can be downloaded from here.
ActivePython has many executables that you can use, but the one you would use for most scripts is "python.exe"
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. Obviously adjust paths to suite your installation. Pay special attention to the Parameters list.
Make sure "Console Application" is checked.
For executable, point it to python.exe
For working directory, point it to the directory in which your python script resides.
For parameters, enter the name of your python script including its extension (eg. script.python)
Now click on the Advanced tab. You can change the Process Priority to allocate more CPU time to ActivePython or specify which CPU or core ActivePython will run on (in the case of multi-processor, hyperthreaded or multi-core CPUs).
Now click on the Dependencies tab. Make sure the service depends on the lanmanworkstation (Workstation) service to ensure the TCP/IP and CIFS stacks are both up prior to starting the Python script.
Now click on the Install button to install and start your Python script!