Add or Remove Service Dependencies in Windows Service Manager

bardimin pic

Written by Bardimin

On February 14, 2023
Home » Blogs » Windows » Troubleshooting » Add or Remove Service Dependencies in Windows Service Manager

You can create a service on Windows depending on the other service. This means that a service will run if the service that is required is already running. How?

is a program that runs in the background on the Windows and does not have a user interface. Windows Services are often used to perform system-level tasks, such as running background tasks, monitoring system resources, and managing system .

The service can be started automatically at system startup or it can be started, stopped, or paused manually by the . Some examples of services included with Windows are Print Spooler, which manages print tasks, and , which lets you schedule automated tasks. In addition, many third-party applications install services as part of their installation process.

windows service

Adding a service dependency is often useful to ensure that the service will run properly by making sure other services that support it are running first.

Many built-in Windows components and third-party applications have dependencies defined during installation and can be accessed from the Services GUI. To add dependencies after installation, you can use Control (SC) commands or manually enter entries in the registry.

Add or remove Windows servicing dependencies through CMD

The first step to being able to add or remove Windows servicing dependencies through a (CMD) is to open and run (CMD) as an .

Note that the “depend” command parameter will overwrite the list of existing dependencies, not add. So, for example, if Service03 already depends on Service01 and Service02, when you run the command “depend= Service04″ it will make Service01 dependent only on Service04.

1. Check service dependencies

You can use the following command to check service dependencies.

sc qc [service_name]

for example: “sc qc Spooler” to check for Windows Print Spooler dependencies.

Make a note of all dependencies from the service if you want to add dependencies, as in the next example.

2. Add servicing dependencies

To add dependencies, you can use the following command.

sc config Service03 depend= Service04

The command means that Service03 will not start until Service04 has already started. If you stop Service04, Service03 will stop automatically.

To add many services at once, you can use the command.

sc config Service03 depend= Service01/Service02/Service04

In that example, for example, the result of checking the service in the first step, Service03 depends on Service01 and Service02.

Then you want to add Service03 also depends on Service04, then you have to write the previous dependencies as well.

3. Remove servicing dependencies

You can't remove any of the dependencies if a service relies on many services. All you can do is remove all dependencies by using the following command.

sc config Service03 depend=/

The command will remove all dependencies on Service03.

Latest Articles

Redirect and Block URLs with HOSTS File on Windows

Redirect and Block URLs with HOSTS File on Windows

Redirect and Block URLs you can easily on Windows. Just by adding the IP of a website, you can redirect or block it. Of course, this is very useful to limit the access of your employees or children from accessing websites that you do not allow. Your Windows PC has...

How to Create Fake Files of Any Size in Windows

How to Create Fake Files of Any Size in Windows

Do you need a file with a size of 10 MB, 100 MB, 1 GB or 1 TB to test? Follow the following article to create one instantly. You don't need to download files or waste time searching for large files, you can create them easily. Sometimes you need large files quickly to...

10 Causes of Windows PC crashes you should know

10 Causes of Windows PC crashes you should know

A fatal error will cause the system to become unstable or busy. Your Windows PC will often display the Blue Screen of Death (BSOD). Do you experience it often? A computer that often crashes is quite annoying for all users, especially when you are doing important work...