windows services

Peter L Hansen peter at engcorp.com
Sat Oct 16 13:37:13 EDT 2004


Francis Lavoie wrote:
> Is it possible to restart windows services? (remotely and locally)
> 
> Because I have a little script that retreive the LastWaitTimeout key of 
> the automatic update, delete that key if it out schedule for our 
> production needs. But still the service need to be restarded if I want 
> that key to be reset, when Win Update will resynchronize with the sus 
> server for new update.

This is initially a non-Python question, because you will need
to identify how you would do that using the Windows API.  Once
you've answered that question (searching MSDN usually helps)
you can try a Google (or Google Groups) search for the name
of the API function along with "python", and usually that will
point you to where someone else has already done it.

If Google doesn't help you at that point, posting here with the
relevant Windows-specific info will generally get you a response
using pywin32 or ctypes that will do the job.

-Peter



More information about the Python-list mailing list