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.
An example .ini file can be downloaded below. The values which can be specified are shown in the following table:
Ini File Variable
|ServiceExeFullPath||Any valid executable path||Full path to program you want to run as a service.|
|options||Any valid command line arguments||Options required by the program (can be blank)|
|desktop||Whether to show the program’s interface.||true or false|
|Start||How the service should start up (at boot, manually, or neither)||Auto or Manual or Disabled|
|StartNow||Whether ServiceEx should start the service immediately*.||true or false|
|Note: once installed, the service should be started and stopped using the Services manager, not by running ServiceEx.|
To get started with ServiceEx:
Download the executable file here. No installation program is needed. Just copy the executable to any directory that you wish to keep it.
Download the example .ini file here. Save it in the same directory where you saved the file ServiceEx.exe
Note: ServiceEx is free to use. It is provided with no warranties of any kind. Use at your own risk.
Thanks is due to Iain Patterson whose NSSM Service Manager provided a starting point for this software.
How to Configure ServiceEx Client Restarts
By default, ServiceEx will restart the underlying application whenever it shuts down. If you do not want this behavior, you can disable it. For now, this requires modifying the registry. This is an advanced action which you should only do if you know what you are doing. Here is how you do it: