Install an application as a Windows service

Srvany.exe (Download mirror) allows one to install a standard application as service. The Srvany acts as a wrapper around the program and handles the service events, so when starting the service it will run the application. One uses the Instsrv.exe to register the Srvany with a service name, and then uses the registry to attach the application which should be started through Srvany.

Instsrv.exe MyService C:\Srvany.exe

[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \MyService \Parameters]
Application = “C:\MyApp.exe”

Note one can control the new service from the command line using SC.EXE or NET.EXE.

Note FireDaemon is similar to Srvany with more bells and whistles, but it costs money.

Note instead of running an application as a service, then one can also consider using a scheduled task to start the application when computer starts or when a user performs logon. See Task Scheduler.

More Info MS KB137890
More Info MS KB166819
More Info MS KB251192