Friday, October 10, 2008

How to run your application as a Windows service

http://www.nick.rozanski.org.uk/software

SVC.EXE

Synopsis. SVC.EXE is a simple Windows NT command-line program to manage NT services. Services can be listed, and individual services can be displayed, installed, modified or removed. It includes facilities to define service dependencies. The program prompts for all needed information from stdin. For most prompts, typing ? will display a help message.

WARNING - YOU ARE ADVISED TO BACK UP YOUR REGISTRY BEFORE RUNNING THIS PROGRAM. (Although I have never encountered any problems while using it.)

You can read more about it here.

SRVSTART.EXE

Synopsis. SRVSTART.EXE is a Win32 executable and DLL which allows you to run commands as if they were Windows NT services. It also has some features to enhance the running of ordinary console commands (prompting for parameters etc). The DLL can be used on its own to build a service without having to write any service management code.


SRVSTART.EXE operates in one of two modes.

  • It can be used to run an ordinary command (executable program batch file). In this command mode, SRVSTART.EXE can prompt the user for the values of command-line parameters such as passwords.
  • It can be used to run an executable program in the context of a Windows NT service (service mode). SRVSTART.EXE will itself handle all of the interactions with the NT Service Control Manager (SCM). It is not necessary for the program to include any service management code.

You can read more about SRVSTART.EXE here and there is a Quick-Start Guide and FAQ here.


No comments :

Post a Comment