how to start my service after all of services were started

Posted on 2006-04-13
Last Modified: 2010-04-15
Hi experts,

I built my service but now I want to my service is started when others services were started. Could you tell me whether or not I can do it? what functions I can use for configuring it?

Thanks you.
Question by:tungpn
    LVL 11

    Expert Comment

    Are you talking about a Window NT (or 2k/XP) service?

    In this case you need to install the service first, so that the Windows service control manager knows about it. For this you can either use the instsrv command or implement the installation into your service itself. To see how to use instsrv just run it from the cmmand line and it will show it's arguments with examples.

    If the service is properly installed you can configure, start and stop with the services control panel (just run services.msc from the command line). I.e. setting the startup type to Automatic in the service's properties will start it automatically when Windows is started.
    LVL 14

    Expert Comment

    take a look at the DependsOnService registry key. This list the service(s) which must start before that service can start.
    LVL 14

    Accepted Solution

    Excuses, that should be DependOnService (without the 's')
    more information:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
    Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
    The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
    The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now