pywin32
pywin32 copied to clipboard
Win32 Service fails to start with Error 1: Incorrect function when using Pywin32-219
Hello. I've attempted to create a Win32 Service using the library but I get an error when trying to start the service with python <filename>.py start
or via the SCM. The python <filename>.py install
command and the python <filename>.py start
always succeed regardless of version. If I use the previous version the service installs, starts and works as expected. Using latest version of Python 2.7.10 x64 in Windows 7 N Pro x64.
Reported by: kounavaki
Original Ticket: pywin32/bugs/704
The python <filename>.py install
command and the python <filename>.py start
always succeed regardless of version. => The python <filename>.py install command
and thesc.exe delete <service_name>
always succeed regardless of the pywin32 version used.
Original comment by: kounavaki
I don't really know why but when installing via wheels (using virtualenvs) by using pywin32-Build 219 of Christoph Gohlke it installs correctly and properly. Otherwise I'm facing the referred issue. In addition, sometimes the win32com does not register properly when using the installer but that is another issue. You may close this if you want but I can send you more information if required :)
P.S.: Really, the exe installer is sometimes buggy although your library is superb! :) Thanks, in any case :D
Original comment by: kounavaki
Hi Everyone I'm facing the same issue while running a python script as a windows service can anyone help me?? Issue:
- I have created a python script for windows service, service is creating I can't able to run I'm getting the following error ( The pythonftp service terminated with the following service-specific error: Incorrect function.) in windows logs.
- I'm able to run the service from windows services, only if I'm creating service from the environment this is also working only on my laptop the same I have tried on another laptop I'm getting the same error.
- I'm sharing a screenshot for reference.
- code link: https://lnkd.in/gsuRPyh
- script name ftpservice.py #python3 #windows
Have you tried running "python pywin32_postinstall.py -install" from an elevated command prompt?
Yes, I have installed and copied pywin32.dll to win32 as we'll.
On Wed, 31 Mar 2021, 03:23 Mark Hammond, @.***> wrote:
Have you tried running "python pywin32_postinstall.py -install" from an elevated command prompt?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mhammond/pywin32/issues/704#issuecomment-810602116, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5BGFWMVZY4BWHPNUPZ3LTGJB5FANCNFSM42CEWBHQ .
Yes, I have installed and copied pywin32.dll to win32 as we'll. … On Wed, 31 Mar 2021, 03:23 Mark Hammond, @.***> wrote: Have you tried running "python pywin32_postinstall.py -install" from an elevated command prompt? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#704 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5BGFWMVZY4BWHPNUPZ3LTGJB5FANCNFSM42CEWBHQ .
@Saleem344 , just following up to see if you had a solution that works for this issue where the python windows service fails to start. Thanks.
Yes I have fixed it.
On Thu, 19 May 2022, 00:29 nanditha55, @.***> wrote:
Yes, I have installed and copied pywin32.dll to win32 as we'll. … <#m_-5394641352450544997_> On Wed, 31 Mar 2021, 03:23 Mark Hammond, @.***> wrote: Have you tried running "python pywin32_postinstall.py -install" from an elevated command prompt? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#704 (comment) https://github.com/mhammond/pywin32/issues/704#issuecomment-810602116>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5BGFWMVZY4BWHPNUPZ3LTGJB5FANCNFSM42CEWBHQ .
@Saleem344 https://github.com/Saleem344 , just following up to see if you had a solution that works for this issue where the python windows service fails to start. Thanks.
— Reply to this email directly, view it on GitHub https://github.com/mhammond/pywin32/issues/704#issuecomment-1130394070, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5BGCHRPP6YC3RLGN3TDLVKU4YFANCNFSM42CEWBHQ . You are receiving this because you were mentioned.Message ID: @.***>