[python-win32] Windows services in python
Dmitry Alekseenko
dalekseenko at gmail.com
Fri Aug 31 19:41:55 CEST 2007
Hey guys,
I've written the following function to enable/disable windows services:
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
win32serviceutil.ChangeServiceConfig(None, serviceName, startType)
And it turns out that when I call Enable('W32Time', False) it corrupts the
"path to executable" property of the service. It replaces the path to
"C:\Python24\lib\site-packages\win32\PythonService.exe".
What wrong am I doing?
Thank you.
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20070831/40b94a6a/attachment.htm
More information about the python-win32
mailing list