Export (0) Print
Expand All

ServiceInstaller.ServicesDependedOn Property

Indicates the services that must be running for this service to run.

Namespace: System.ServiceProcess
Assembly: System.ServiceProcess (in system.serviceprocess.dll)

public string[] ServicesDependedOn { get; set; }
/** @property */
public String[] get_ServicesDependedOn ()

/** @property */
public void set_ServicesDependedOn (String[] value)

public function get ServicesDependedOn () : String[]

public function set ServicesDependedOn (value : String[])

Property Value

An array of services that must be running before the service associated with this installer can run.

A service can require other services to be running before it can start. The information from this property is written to a key in the registry. When the user (or the system, in the case of automatic startup) tries to run the service, the Service Control Manager (SCM) verifies that each of the services in the array has already been started.

If any service in the array is not running then, the SCM tries to start them. This includes services with ManualStartType.

If any service upon which this service depends fails to start, this service will not start. An exception is not thrown if the system is not started because there is no exception handling at the system level to detect this. Decide how to handle service start failures and implement this in your code. Typically, a dialog appears to the user at startup if a service fails to start.

If the service does not start, an entry is written to the Application event log.

The services upon which this service depends do not need to be in the same executable.

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft