Open zcc0077 opened 4 months ago
The reason this is done is because you might have upgraded pywin32 and trying to use a new pywin32 with an old .exe is going to end badly. An option would be to add a command-line param to the service install code to skip this step, which I'd be happy to take a PR for.
Thanks a lot :), I fixed temporarily by explicitly assign exe to _exe_name_
and no copy action was executed:
class MySrv(win32serviceutil.ServiceFramework):
_svc_name_ = "MySrv"
_svc_display_name_ = "My Service"
_exe_name_ = "C:/Python311/Lib/site-packages/win32/pythonservice.exe"
def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
self.hWaitStop = win32event.CreateEvent(None, 0, 0, None)
Note that issues in this repository are only for bugs or feature requests in the pywin32.
There is a problem, I need to install multiple python script services, I installed the first one is fine, the output is:
When I install another service, I get an error:
I found that because C:\Python311\pythonservice.exe is occupied by the first service, it cannot be copied successfully. In this case, I can only stop the previous service and then install other services, which will make my service deployment very troublesome (I did not have this problem when using python2 before).