listing existing windows services with python

Alf P. Steinbach alfps at
Tue Feb 16 01:17:31 CET 2010

* News123:
> Hi,
> What is the best way with python to get a list of all windows services.
> As a start I would be glad to receive only the service names.
> However it would be nicer if I could get all the properties of a service
> as well.
> Thanks for any info and bye

* Library:

   If there is some existing library for that (just search the web) then that
   would probably be the easiest.

* Registry functions:

   Otherwise, I'd use the general registry access functions.

   Info about the registry access functions is available in your Python docs.

   All the information about services is in the Windows registry (documented in
   the MSDN Library, which is available in a browsable on-line version at

* Text-oriented commands:

   An alternative to using the registry access functions is to capture the output
   of e.g. the 'sc' command.

   The 'net' command also has some functionality related to services, e.g.
   'net start'.

Cheers & hth.,

- Alf

More information about the Python-list mailing list