[python-win32] Re: How to determine whether program runningasservice?

Mark Hammond mhammond at skippinet.com.au
Sat Sep 11 01:56:44 CEST 2004


> I'm not sure I really understand, and don't have time too
> look into the
> code right now.
>
> Would it be possible with these changes to have code like this at the
> end of py2exe's boot_service.py:
>
> """
> if launched_as_service:
>     servicemanager.StartServiceControlDispatcher()
> """
>
> so that the StartServiceControlDispatcher is not called when
> the service
> exe is started manually by the user?

I don't understand what you are asking - even when manually started by the
user, we need to register with the SCM.  The only exception is when we are
debugging, when we don't make that call.

Mark.



More information about the Python-win32 mailing list