Skip to content

Service Dependencies

aelassas edited this page Aug 19, 2026 · 32 revisions

Table of Contents

  1. Introduction
  2. GUI
  3. CLI Option: --deps
  4. CLI Example
  5. PowerShell Option: -Deps
  6. PowerShell Example
  7. Dependency Tree Visualization

Introduction

Servy supports optional service dependencies, allowing a service to start only after one or more other Windows services are running.

Enter each dependent service by its service name (not the display name) on a new line or separate them with semicolons (;).

This ensures that your service starts in the correct order and avoids errors if required services are not yet running.

GUI

The advanced tab provides additional configuration options such as service dependencies.

servy-config-advanced

CLI Option: --deps

The --deps command-line option lets you specify one or more Windows service dependencies when installing a service via the CLI.

  • Syntax: --deps="Service1; Service2; Service3"
  • Windows starts the listed services first (automatic-start dependencies are started on demand); if any dependency fails to start or is disabled, the service will not start.
  • Multiple dependencies can be separated with semicolons.
  • This is especially useful for applications that rely on databases, message brokers, or other background services.

CLI Example

servy-cli install `
  --name="MyNodeService" `
  --description="My NodeJS Server" `
  --path="C:\Program Files\nodejs\node.exe" `
  --startupDir="C:\Apps\App" `
  --params="C:\Apps\App\index.js" `
  --startupType="Automatic" `
  --deps="MongoDB; MySQL80"

PowerShell Option: -Deps

The -Deps parameter lets you specify one or more Windows service dependencies when installing a service via PowerShell.

  • Type: string (semicolon-separated list, optional)
  • Windows starts the listed services first (Automatic-start dependencies are started on demand); if any dependency fails to start or is disabled, the service will not start.
  • Multiple dependencies can be separated with semicolons.
  • Useful for services that rely on databases, message brokers, or other background services.

PowerShell Example

Import-Module "C:\Program Files\Servy\Servy.psm1" -Force

$installParams = @{
    Name         = "MyNodeService"
    Description  = "My NodeJS Server"
    Path         = "C:\Program Files\nodejs\node.exe"
    StartupDir   = "C:\Apps\App"
    Params       = "C:\Apps\App\index.js"
    StartupType  = "Automatic"

    Deps         = "MongoDB; MySQL80"
}

Install-ServyService @installParams

Dependency Tree Visualization

The Dependencies tab in Servy Manager provides a visual representation of a service dependency tree retrieved from the Service Control Manager (SCM). Each dependency is displayed with its current status, where running services are shown in green, stopped services in red, and cycles in orange. The tree can be refreshed at any time using the Refresh button or by pressing F5.

This view is especially useful for understanding startup and shutdown order, diagnosing why a service fails to start, and quickly identifying stopped or missing dependencies that may impact service availability.

servy-manager-dependencies

Tip

You can combine service dependencies with pre-launch scripts and health checks to ensure that your service starts reliably in complex environments.

Clone this wiki locally