How to create a windows service in XP

You can use SC to create user defined services. This command will create a service:

sc.exe create "Service Name" binPath= "C:\Your Program.exe"

Note there must be a space between binpath= and the program location.

To Delete the service use:

sc.exe delete "Service Name" 

Use SRVANY.EXE from Windows * Resource Kit

For Cygwin applications Use cygrunsrv (NT/W2K service initiator)


Also, once you successfully started your normal application as a service, I would suggest to test how the application behaves when you log off.

Some applications (old ones?) don't like receiving the message that is sent when logging of or shutting down the computer.


FireDaemon is another option for doing this.