win32Service.OpenService not working

Gordon McMillan gmcm at hypernet.com
Mon Jun 5 17:03:26 EDT 2000


tiddlerdeja at my-deja.com wrote in <8hggdu$4fa$1 at nnrp1.deja.com>:

>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)

Are you sure that's not the "descriptive name" instead of the "service 
name"? The services applet shows you descriptive names. Off hand, I'm not 
sure how to find the real name.

- Gordon



More information about the Python-list mailing list