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

Updated: 26 March 2009

Comments:

  1. w.-g.esders says:

    just look here. it´s in german and great and free

    http://www.pirmasoft.de/runassvc.php

  2. Rukmal says:

    w.-g.esder

    Thanks you very much !!

  3. Xantes says:

    "runassvc" works flawlessly in Win 7! Tested an currently running in Win 7! Very much appreciated the posted link! And since at that time it was made for Win XP I am very sure that works for XP, as well(though didn't test it in XP)!

  4. Nick says:

    This tiny app allows to solve one knotty problem with Win7. It starts PPPoE connection before login when you have to keep access to remote PC after its rebooting!

  5. CoreTech says:

    You can also use AlwaysUp to run your application as a service.

    Please see this detailed comparison of Srvany and AlwaysUp for details.

Leave a Reply

Your email address will not be published. Required fields are marked *