470,647 Members | 1,114 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

win32serviceutil - remove service

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/Coo...n/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.
Jul 18 '05 #1
1 4112
Something like this should work if you have sufficient privileges.

import win32service
svc_mgr =
win32service.OpenSCManager('server_name',None,win3 2service.SC_MANAGER_ALL_AC
CESS)
svc_handle =
win32service.OpenService(svc_mgr,'svc_name',win32s ervice.SERVICE_ALL_ACCESS)
win32service.DeleteService(svc_handle)

Roger
"ChrisH" <se***@yahoo.com> wrote in message
news:MP***********************@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/Coo...n/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.

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by max | last post: by
1 post views Thread by Erik Myllymaki | last post: by
5 posts views Thread by Jacobus Terhorst | last post: by
2 posts views Thread by C.C. \(aka Me\) | last post: by
1 post views Thread by Ronald S. Cook | last post: by
5 posts views Thread by Nikola Skoric | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.