[python-win32] Windows services in python

Dmitry Alekseenko dalekseenko at gmail.com
Sat Sep 1 01:22:05 CEST 2007


You're right. Sorry about that. And thank you for help!

Dmitry

On 8/31/07, Tim Roberts <timr at probo.com> wrote:
>
> Dmitry Alekseenko wrote:
> > win32service methods produces the same problem:
> >
> > def Enable(self, serviceName, enable, autoStart=False):
> >     startType = None
> >     if not enable:
> >         startType = win32service.SERVICE_DISABLED
> >     elif autoStart:
> >         startType = win32service.SERVICE_AUTO_START
> >     else:
> >         startType = win32service.SERVICE_DEMAND_START
> >
> >     scm = win32service.OpenSCManager (None, None,
> >                                      win32service.SC_MANAGER_ALL_ACCESS)
> >     svc = win32service.OpenService(scm, serviceName,
> >                                    win32service.SC_MANAGER_ALL_ACCESS)
> >     win32service.ChangeServiceConfig(svc, win32service.SERVICE_NO_CHANGE
> ,
> >                                      startType,
> >                                      win32service.SERVICE_NO_CHANGE,
> >                                      None, None, 0, None, None, None,
> > None)
> >     win32service.CloseServiceHandle(svc)
>
> I'm afraid I don't believe you.  Did you change the ImagePath back to
> its proper value before you tested this?  (It should be
> "%SystemRoot%\System32\svchost.exe -k netsvcs")  Remember, this won't
> fix the damage that your previous script did; it just leaves ImagePath
> where it was.
>
> --
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20070831/93a30d24/attachment.htm 


More information about the python-win32 mailing list