Technical FAQs

Ask a Question

How to add a dependency to a service

Issue
No existing user interface to add a dependency to a service once created.

Product Line
Windows Server 2008
Windows Server 2012
Windows 7

Environment
Modifying a service in elevated command prompt

Cause
A user wants to add a dependency to an existing service.

Resolution
1) Open a command prompt as administrator.

2) To list current dependencies, type the following command where ServiceA is the name of the service you want to add a dependency:
sc qc ServiceA

3) To add multiple dependencies, type the following command where Service B,C,D are services to add as a dependency for ServiceA:
sc config ServiceA depend= ServiceB/ServiceC/ServiceD

The command above means that ServiceA will not start until ServiceB, ServiceC, and ServiceD have all started. If you stop any of ServiceB, ServiceC, or ServiceD, ServiceA will stop automatically.

4) To remove all dependencies, type the following command:
sc config ServiceA depend= /

 
Was this helpful?
What can we do to improve the information ?