2.8. Service

The list of services is accessible via windows.system.services

Note

See sample windows.system

class windows.winobject.service.ServiceStatus(type, state, control_accepted, flags)

type might be one of:

  • SERVICE_KERNEL_DRIVER(0x1L)
  • SERVICE_FILE_SYSTEM_DRIVER(0x2L)
  • SERVICE_WIN32_OWN_PROCESS(0x10L)
  • SERVICE_WIN32_SHARE_PROCESS(0x20L)
  • SERVICE_INTERACTIVE_PROCESS(0x100L)

state might be one of:

  • SERVICE_STOPPED(0x1L)
  • SERVICE_START_PENDING(0x2L)
  • SERVICE_STOP_PENDING(0x3L)
  • SERVICE_RUNNING(0x4L)
  • SERVICE_CONTINUE_PENDING(0x5L)
  • SERVICE_PAUSE_PENDING(0x6L)
  • SERVICE_PAUSED(0x7L)

flags might be one of:

  • 0
  • SERVICE_RUNS_IN_SYSTEM_PROCESS(0x1L)
control_accepted

Alias for field number 2

flags

Alias for field number 3

state

Alias for field number 1

type

Alias for field number 0

class windows.winobject.service.ServiceA[source]

Bases: windows.winobject.service.Service, windows.generated_def.winstructs._ENUM_SERVICE_STATUS_PROCESSA

A Service object with ascii data

description

The description of the service

Type:str
name

The name of the service

Type:str
process

The process running the service (if any)

Type:WinProcess or None
status

The status of the service

Type:ServiceStatus