This is a short "howto" make a program run as a service.

Windows 2000/XP/Etc

In my example I will be using Kiwi Syslog Daemon.
(Yes, I realize that there is already a service version... I just used this as my example.)

I downloaded and Installed Kiwi Syslog Daemon from http://www.kiwisyslog.com/
I just used the standard edition because I want to show how to make a program run as a service.

I'll attach the needed files in a zip. These files (instsrv.exe and srvany.exe) should be placed in the root directory of the program that you want to run as a service. These files are also included with the windows 2000 resource kit.

I installed mine to "C:\Program Files\syslogd"

From a command prompt:

I type

Code:
c:whatever comes up>cd \
c:> cd "C:\Program Files\Syslogd"
C:\Program Files\Syslogd>instsrv.exe syslogd  "c:\Program Files\Syslogd\srvany.exe"
Note that the syslogd that I've bolded is what I've decided to name the service.
I know... I'm VERY creative.

It should tell you that it was a success and that you have to make some changes in the registry.

Now, click on start, run and type regedit

Browse to:

HKLM\SYSTEM\CurrentControlSet\Services\syslogd

Right click and create a new key called Parameters.
Then browse to Parameters.

HKLM\SYSTEM\CurrentControlSet\Services\syslogd\Parameters

Right click and create a new String Value called "Application"

For the Data Value, type in the location of the program's executable.

C:\Program Files\Syslogd\syslogd.exe

Now you are ready to make it start.
You can browse to the service manager and manually start it, or you can reboot.

There you are. Its that easy to make a program run as a service.

NOTE: So far, whatever I'd tried... I am NOT able to end process on the process. I have to stop the service to kill it. You can start/stop the service from the service control manager or from CLI

net start servicename
net stop serrvicename

Yay!!! I've got mail! Yay!!!