Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RE: How can I enumerate all windows services and disable some of them?

Reply
Thread Tools

RE: How can I enumerate all windows services and disable some of them?

 
 
Tim Golden
Guest
Posts: n/a
 
      08-22-2006
[Tim Golden]

| []
|
| | 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.

.... or I could actually read the question before answering.
I don't know if you can actually *disable* a service
from WMI. You can certainly stop it, but the status appears
to be a read-only option.

Sorry
TJG

__________________________________________________ ______________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
__________________________________________________ ______________________
 
Reply With Quote
 
 
 
 
Tim Golden
Guest
Posts: n/a
 
      08-23-2006

Tim Golden wrote:
> [Tim Golden]
>
> | []
> |
> | | 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Indexing services under Windows XP SP2 - Can I disable MS Indexing Service to hasten Google's OR does Google Desktop uses this MS Indexing Service? ricardodefaria Computer Support 6 08-05-2007 04:14 AM
How can I enumerate all windows services and disable some of them? could.net@gmail.com Python 1 08-22-2006 10:47 AM
How to enumerate all properties of the object and output them? GS ASP .Net 1 01-09-2006 05:04 PM
Programmaticly enumerate all controls and properties on an ASP.NET page J ASP .Net 3 11-21-2005 06:14 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57