Add a Windows service dependency

By adding a "DependOnService" Multi-String value to the registry element of a service, you can delay the startup of a service until the dependee has started.

When you want to be sure a service (dependee) is started before your own service (dependent) starts, you can add a dependency to the dependent service. This can be done by adding a registry value to the dependent service. This, for example, is useful for services that depend on a running database. In that case add a dependency on you service to the database service.

  1. Start the Registry Editor (regedit in the "Run command box")
  2. Go to registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\dependent service name
  3. Add a new Multi-String value (type REG_MULTI_SZ)
  4. Name it "DependOnService" (without the quotes)
  5. Select "Modify" on the new data entry and add the service name (or multiple services, each on a new line) the dependent service depends upon. Make sure it is named exactly like the key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.