Contents

Method

GetServiceInfo

ModuleOperatingSystem
LibraryCore
Action

Retrieves a list of all services.

Parameters(None)
Return valuesName (string): The service's name.
Description (string): The descriptive name of the service.

Type (string): One of:

    • File system driver
    • Kernel driver
    • Own process
    • Per-user
    • Shared process
    • <empty string>
'Per-user' is only reported from v5.2 onwards; it was an <empty string> for per-user services in older versions.

State (string): One of:

    • About to continue
    • Pausing
    • Paused
    • Running
    • Starting
    • Stopping
    • Stopped
ProcessId (int): The process identifier of the service, or 0 if the service is not running.

StartType (string): One of:

    • Automatic
    • Boot (kernel driver only)
    • Manual
    • Disabled
    • System (kernel driver only)

ErrorControl (string): One of:

    • SERVICE_ERROR_CRITICAL
    • SERVICE_ERROR_IGNORE
    • SERVICE_ERROR_NORMAL
    • SERVICE_ERROR_SEVERE
BinaryPath (string): The full path of the executable that is/will be started by the service controller.
StartAccountName (string): The name of the user account under which the service will be started.
DelayStart (boolean): True if the service is set to delayed auto-start (applies to Windows Vista and up); v4.0 onwards
TriggerStart (boolean): True if the service is set to start on a trigger (applies to Windows 7 and up); v4.0 onwards
Example
 OperatingSystem.GetServiceInfo();
Platforms
  • Windows
Notes