Friday, May 17, 2013

Setting up a windows service... run anything as a service

There is a freeware solution to setting things up as a service that seems to work better (in more cases) than traditional approaches.

    http://www.serviceex.com/


ServiceEx is a freeware Windows application that allows a normal program to run as a Windows service. Currently it is command line only. A version with a GUI is forthcoming. In the meantime, configuration options are specified via an .ini file that must be created prior to running ServiceEx.

ServiceEx differs from Microsoft's srvany in that it monitors the program and relaunches it whenever it shuts down for any reason. If you do not wish to have this behavior, you can turn it off. A link to download it is provided below.

Sample .ini file:

[ServiceEx] 
ServiceExeFullPath = "C:\Program Files\calibre2\calibre-server.exe"  

; program arguments to be sent to executable 
options =-p 8081 --with-library "c:\calibre library" 

; can program interact with desktop [true | false] (default: true) 
desktop = false

; start type (valid values: Auto Manual Disabled) (default: auto) 
Start=Auto 

; start the service upon installation [true | false] (default: no)  
StartNow=false 

No comments:

Post a Comment