Tim Golden wrote:
> [Tim Golden]
>
> | [EMAIL PROTECTED]
> |
> | | I know that Module win32service has some functions on manipulating
> | | win32 services.
> | | But I still have 2 questions:
> | | 1. how to enumerate all services?
> | | 2. how to disable a certain one?
> |
> | You can use WMI to do this if you want.
>

(continues talking to self...)

In fact you *can* do this with WMI.
eg, to disable the Alerter service:

<code>
import wmi
c = wmi.WMI ()
for service in c.Win32_Service (Caption="Alerter"):
  service.Change (StartMode="Disabled")

</code>

TJG

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to