Thread: Services

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Posts
    287
    Rep Power
    13

    Services


    Can you add a windows service?
    I have looked everywhere, and I cannot find an option to add a windows service. Well...I obviously havnt looked everywhere because I know programs like proxy+ install themselves as services. But how do i do it manually?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    what do you want to add? if you install apache or mysql eg, they appear automagically in the services list.
    if you want other MS-services, go to "control panel / software / windows setup"

    if you want to make your own service, youŽll have to learn a lot about programming and the windows API...
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Posts
    287
    Rep Power
    13
    dam...what do you mean? Are services added in the actual VB code or C++ code ot what?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    yes. and no. afaik services need to call special functions to become services (called similar to "register_service_process()" - canŽt remember right now and too lazy to look it up, but i will if you ask me to...)

    then they need to make some registry entries (this is probably what you are looking for), eg. in
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services to make it possible to start them via "Administration/Services"

    and (i am just guessing now!) services probably have to be COM-servers or something similar and need to register a global GUID somewhere (to be done by your installer).

    i never did this before, so you might want to ignore my answer(s) and search on http://msdn.microsoft.com yourself.
    Last edited by M.Hirsch; October 5th, 2002 at 09:14 AM.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Posts
    287
    Rep Power
    13
    Thanks M. Hirsch!
    No need to look stuff up, i was just wondering, now i kind of know what its all about. Cheers.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2002
    Posts
    693
    Rep Power
    26
    I have written services in VB (not supported by MS though) that use the ntsvc.ocx. The application handles command-line parameters to install/uninstall itself. If you're really interested reply to the post and I can find some examples.... or just go to the msdn site and search for services.

IMN logo majestic logo threadwatch logo seochat tools logo