Questions tagged [win32serviceutil]

15 questions
4
votes
0 answers

Grant python permissions to run windows services

I'm having quite an hard time trying to start a windows service from python using: win32serviceutil.StartService("service-name") It always returns: File "C:\Python27\lib\site-packages\win32\lib\win32serviceutil.py", line 412, in…
user3184086
  • 711
  • 1
  • 9
  • 16
3
votes
1 answer

Python3.7 Service Error 1063: The service process could not connect to the service controller

i can't figure out why i can't start the service in the code below. I can install it and run it in debug (here i can't stop the service without closing the console) mode, but start raises this error: 1063: The service process could not connect…
Luca
  • 344
  • 5
  • 18
3
votes
0 answers

Python (win32serviceutil) & multiprocessing module - file not found

I have a Python 3.4 application which uses cherrypy for servicing rest calls. I had adapted this code to run as a Windows service using and within one of the modules, the win32serviceutil.ServiceFrameworkmultiprocessing module is used.…
2
votes
1 answer

To restart WinRM services

I was trying to restart winRM services in multiple servers, but am getting below error can I get suggestions. Restart-Service -ComputerName (Get-Content G:\12282019\Servers.txt) -ServiceName WinRM error: Restart-Service : A parameter cannot be…
Prasanth K S
  • 63
  • 1
  • 2
  • 7
1
vote
1 answer

win32serviceutil issue with starting a custom service

I'm trying to create a windows service by using the code below. The global variables are defined, and the imports are properly imported. The main bulk of the code is: class MyHandler(FileSystemEventHandler): def __init__(self): …
1
vote
1 answer

Using a remote Powershell Session to change a service username/password

I have a list of servers, and then another list of services on each of those servers. I am trying to remove it, change a few values in the .bat and then install the services again. Right now I have started a remote Powershell Session…
1
vote
0 answers

Python service is not starting in windows machine error 1053

I have created Flask Application as windows service by using Pyinstaller. I installed it in my local machine(Windows 10). Its working fine. The same exe I tried to install in Windows server, it is installed but not running and throwing error, Error…
Raj De Inno
  • 1,092
  • 2
  • 14
  • 33
1
vote
1 answer

Using configparser in Python service is not starting the service

I have used configparser to read a configuration file in python. When the script is converted to Windows Service it is giving error saying "Error starting service: The service did not respond to the start or control request in a timely fashion." I…
1
vote
0 answers

failing to install and start windows service with winreg imported

So I'm building a pretty simple service in python3.6. Client want's it to run on windows, so I'm using the win32serviceutil package to make a windows service. I install and package with pyinstaller and so far everything works great. The issue I'm…
CHURLZ
  • 166
  • 10
1
vote
1 answer

Reporting an Error from win32service

Let's say I have a Service that I've written that's based on win32serviceutil.ServiceFramework like so: class Launcher(win32serviceutil.ServiceFramework): _svc_name_ = "QueueFolders" _svc_display_name_ = "Queue Hot Folders" def __init__(self,…
g.d.d.c
  • 46,865
  • 9
  • 101
  • 111
0
votes
0 answers

Python win32serviceutil ModuleNotFoundError

I created a Python win32serviceutil service following the excellent guide at https://thepythoncorner.com/posts/2018-08-01-how-to-create-a-windows-service-in-python/. It will install just fine C:\›python PowerMasterUPS.py install Installing service…
0
votes
0 answers

Open .exe in window service as user using python

i want to create window service using python to monitor notepad.exe whether it open or not. if the application not open, the service will open the notepad.exe and it will only allow one notepad.exe opened. How to make this the service launch as…
lvsilver
  • 43
  • 1
  • 8
0
votes
1 answer

Jupyter notebook kernel error when added python flask app as a service using pywin32 on windows

I have created flask app that can run jupyter notebook server. When we click on app from the UI, a new subprocess is created using subprocess.Popen() to construct a Jupyter notebook server. I created the windows service for the flask webapp using…
0
votes
1 answer

prompt shell in window service via python

I want to prompt up a shell in windows service via python. The following is my code. It runs buy the prompt is running background instead of showing up. Thank you very much! import win32service import win32serviceutil import win32event import…
hi bye
  • 89
  • 1
  • 5
0
votes
0 answers

Python Windows Service Can't Generate/Write to CSV

I'm making a windows service written in python 3.6.6. When I install it to services.msc it stops when it generate a csv file from my server: MySQL Work Bench CE. When I debug my windows service this is the error. Error: Debugging service…