How to Add a Dependency to a Windows Service

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

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.

Your Name

Your Email

Suggested Topic

Suggestion Details

Looking for support or consultancy with Microsoft Dynamics GP?

I no longer work with Microsoft Dynamics GP, but the last company I worked for was ISC Software in the UK; if you’re looking for support or consultancy services with Microsoft Dynamics GP you can contact them here.

1 thought on “How to Add a Dependency to a Windows Service

Leave a Reply

Your email address will not be published. Required fields are marked *