Programmable Voice

  1. Home
  2. Docs
  3. Programmable Voice
  4. How do I
  5. Add Service Dependencies

Add Service Dependencies


Why Should I Add Service Dependencies?

Often it can be helpful to add Service Dependencies to make sure that the services that Voice Elements may rely on are started up before trying to start up Voice Elements. Also, you may want to add a dependency to Voice Elements to ensure that your application will be able to successfully restart after unexpected reboots.

Below are two methods for adding a dependency. You will only want to use ONE of the methods below.

Using the SC tool

You’ll need to open up a command line editor. You can do this by typing “cmd” in the run command window. You will also need to make sure that you have Administrator access. You can do this by right clicking and selecting “Run As Administrator” after entering cmd. Please see the image below for help:

Screenshot - Opening a Command Line

SC commands are entered using the syntax below:

sc config [service name] depend= <Dependencies(separated by / (forward slash))>

In our case to add HMP Elements as a dependency for Voice Elements, you would issue the following command (note that a space is required after the = sign):

sc config VoiceElements depend= HmpElements

It is also useful to query the SC tool to determine the service names to use for the command above by using the following command:

sc query type= service state= all

This will return to you all of the services that are currently installed.

Editing the Registry

First, You’ll need to open up the registry by opening up the command window, or command line, and entering “regedit”. This should open up the Microsoft tool to edit your registry. You’ll want to browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\. Here you should see a list of the services that you have installed.

Next, you’ll want to find the service that you would like to add a dependency to. (In this case “VoiceElements”.)

You will then need to add a key called “DependOnService”. You should then put the name of the service that you want it to depend on for it’s value.

Checking Your Dependency

Open the Service Control Manager by typing in the command window “services.msc”. Browse for the service you have modified, right click and select “Properties”. Select the “Dependency” tab. You should then see the services that it depends on.

Was this article helpful to you? Yes 15 No