win32serviceutil won't start

kyosohma at gmail.com kyosohma at gmail.com
Sun Nov 25 16:52:35 EST 2007


On Nov 25, 2:40 pm, Nikola Skoric <nick-n... at net4u.hr> wrote:
> I have a very simple win32serviceutil script:
> import win32serviceutil, time
>
> win32serviceutil.StartService("burek", "localhost")
>
> time.sleep(10)
>
> exit()
>
> It successfuly imports win32serviceutil, and chokes on StartService:
> Traceback (most recent call last):
>   File "foobar.py", line 3, in ?
>     win32serviceutil.StartService("burek", "localhost")
>   File "C:\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line
> 399, in StartService
>     hs = SmartOpenService(hscm, serviceName, win32service.SERVICE_ALL_ACCESS)
>   File "C:\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line
> 76, in SmartOpenService
>     return win32service.OpenService(hscm, name, access)
> pywintypes.error: (1060, 'OpenService', 'The specified service does not
> exist as an installed service.')
>
> What does that mean?
>
> --
> "Now the storm has passed over me
> I'm left to drift on a dead calm sea
> And watch her forever through the cracks in the beams
> Nailed across the doorways of the bedrooms of my dreams"

Looks like Microsoft thinks you mis-spelled it.

http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/w2000Msgs/3310.mspx?mfr=true

I would check and see if that service is installed on your PC. You can
go to Start --> Run and type services.msc

Scroll through there and see if your service is listed. You might
check to see if you can enable/disable it via that console as well.

Mike



More information about the Python-list mailing list