listing existing windows services with python
Alf P. Steinbach
alfps at start.no
Tue Feb 16 01:17:31 CET 2010
> 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
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.
Cheers & hth.,
More information about the Python-list