Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

win32servicedemo.py 579B

1234567891011121314151617181920212223
  1. import win32con
  2. import win32service
  3. def EnumServices():
  4. resume = 0
  5. accessSCM = win32con.GENERIC_READ
  6. accessSrv = win32service.SC_MANAGER_ALL_ACCESS
  7. # Open Service Control Manager
  8. hscm = win32service.OpenSCManager(None, None, accessSCM)
  9. # Enumerate Service Control Manager DB
  10. typeFilter = win32service.SERVICE_WIN32
  11. stateFilter = win32service.SERVICE_STATE_ALL
  12. statuses = win32service.EnumServicesStatus(hscm, typeFilter, stateFilter)
  13. for short_name, desc, status in statuses:
  14. print(short_name, desc, status)
  15. EnumServices()