win32serviceutil - remove service

Roger Upole rupole at hotmail.com
Tue Jun 22 18:16:52 EDT 2004


Something like this should work if you have sufficient privileges.

import win32service
svc_mgr =
win32service.OpenSCManager('server_name',None,win32service.SC_MANAGER_ALL_AC
CESS)
svc_handle =
win32service.OpenService(svc_mgr,'svc_name',win32service.SERVICE_ALL_ACCESS)
win32service.DeleteService(svc_handle)

     Roger


"ChrisH" <secun at yahoo.com> wrote in message
news:MPG.1b424c3559bdcc8989684 at news2.atlantic.net...
> Does anyone know of a way to remove a Windows service on a remote
> machine using python?
>
> I found the following link on ASPN that tells you how to do just about
> everything but remove a service.
>
> Manipulating Windows Services
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/59872
>
> According to the article, the answer is in Python Programming on Win32.
> I have that book and still can't find the answer.





More information about the Python-list mailing list