win32Service.OpenService not working
tiddlerdeja at my-deja.com
tiddlerdeja at my-deja.com
Mon Jun 5 11:19:45 EDT 2000
Can you help?
I'm trying to get a handle on a service but can't. If I use the
following code, it works:
h = win32service.OpenService(hscm, "UPS",
win32service.SERVICE_ALL_ACCESS)
However, if I try to get a service with a space in the name, I get an
error:
>>> h = win32service.OpenService(hscm, "Windows installer",
win32service.SERVICE_ALL_ACCESS)
Traceback (innermost last):
File "<stdin>", line 1, in ? pywintypes.api_error:
(1060, 'OpenService', 'The specified service does not exist as an
installed service.')
I even tried to convert the name to unicode with now luck:
>>> www = win32api.Unicode("Web Site Update")
Can anyone tell me what I'm going wrong.
I'm doing this with administrator privileges.
Any help greatly appreciated.
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list