web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

How to Add a Dependency to a Windows Service

Ian Grieve Profile Picture Ian Grieve 22,784

Windows ServerWhile I was blogging about implementing SmartConnect, I mentioned that the service account should be either set as delayed start or have a dependency added.

The former option, making it delayed start, can be done through the Services control panel applet, you can’t add a dependency this way. Instead the dependency can be added via a command.

The service can be changed by using the sc.exe which is a component of Windows. To use the command we need to know the Service name of both the service we want to add the dependency to and also the service name of the service it will be dependent on.

In my example, I am adding a dependency to the eOne SmartConnect Service; to find the Service name, open Services from the Control Panel, rich-click the service and locate the Service name:

eOne SmartConnect Service Properties

Repeat this for the service on which the first service is to be dependent:

SQL Server (GP) Properties

The command is run via the Command Prompt; the command is as follows (replace the highlighted sections with the service names retrieved as above):

sc config {service to have the dependency added} depend={service to be dependent on}
sc config eOne.SmartConnect.WindowsService.exe depend=MSSQL$GP

Once the command has been run, you can check the Properties of the service and make sure the dependency is correctly listed:

eOne SmartConnect Service Properties

(Visited 7 times, 1 visits today)

This was originally posted here.

Comments

*This post is locked for comments