Results 1 to 4 of 4

Thread: Make a program run as a service

  1. #1
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325

    Make a program run as a service

    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!!!
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

  2. #2
    Senior Member
    Join Date
    Apr 2004
    Posts
    1,024
    Great tutorial. Helped me with my question I had from a while back on how exactly to use the .exe's to make the program a service.
    [H]ard|OCP <--Best hardware/gaming news out there--|
    pwned.nl <--Gamers will love this one --|
    Light a man a fire and you\'ll keep him warm for a day, Light a man ON fire and you\'ll keep him warm the rest of his life.

  3. #3
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325
    Well, it looks as if this has already been done by HT.

    http://antionline.com/showthread.php?s=&threadid=244583

    I suppose I should have searched to see if it had been done.

    Sorry HT, don't want you to think that I stole your material.

    You can tell they are different... but the procedure is still the same.

    If you want this deleted, I have no objections.

    Have a good weekend!
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

  4. #4
    Senior Member
    Join Date
    Jan 2003
    Posts
    3,915
    Hey Hey,

    No need to have the tutorial deleted dude... I was just bugging ya.. :P I think it's a good tutorial because it's generalized, my was slightly different because it was dealing with DSL and PPPoE. I'll catch ya on AIM...

    Peace,
    HT

    PS. You can make it up to me by sending me that router you got laying around j/k

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •