# 2.8. Service

The services manager is accessible via `windows.system.services`

Note

See sample windows.system & Services

## 2.8.1. ServiceManager

class `windows.winobject.service.``ServiceManager`

  Bases: `windows.utils.pythonutils.AutoHandle`

  An object to query, list and explore services

  `__getitem__`(key, access=MAXIMUM_ALLOWED(0x2000000))

    Get a service by its name/index or a list of services via a slice

    Returns: | `Service` or [`Service`] – A `Service` or list of `Service`

  `__iter__`()

    Iter over the services on the system

    Yield: | `Service`

  `get_service`(key, access=MAXIMUM_ALLOWED(0x2000000))

    Get a service by its name/index or a list of services via a slice

    Returns: | `Service` or [`Service`] – A `Service` or list of `Service`

  `handle`

    An handle on the object

    Type: | HANDLE Note The handle is automaticaly closed when the object is destroyed

  `wait`(timeout=INFINITE(0xffffffff))

    Wait for the object

## 2.8.2. Service

class `windows.winobject.service.``Service`(handle, name, description=None)

  Represent a service on the system

  `description`

    The description of the service

    Type: | `str`

  `name` = None

    The name of the service

    Type: | `str`

  `process`

    The process running the service (if any)

    Type: | `WinProcess` or `None`

  `security_descriptor`

    The security descriptor of the service

    Type: | `SecurityDescriptor`

  `start`(args=None)

    Start the service

    Parameters: | args – a list of `str`

  `status`

    The status of the service

    Type: | `SERVICE_STATUS_PROCESS`

  `stop`()

    Stop the service

  `value`

    current value