While 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:
Repeat this for the service on which the first service is to be dependent:
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}
Once the command has been run, you can check the Properties of the service and make sure the dependency is correctly listed:
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.
1 thought on “How to Add a Dependency to a Windows Service”