srvwrapper wraps any applications to run as Windows Service
Project description
srvwrapper
Create Windows service from executable
Install
Step 1:
Download and install the srvwrapper
package for python.
pip install srvwrapper
Step 2:
Use the srvwrapper
command and pass the service name and program path to create a service. Other optional commands are listed with the --help
command.
usage: srvwrapper [-h] [--arguments ARGUMENTS] [--display DISPLAY]
[--description DESCRIPTION] [--start START] [--obj OBJ]
name program
Wrap any applications to run as Windows Service
positional arguments:
name service name
program application path
optional arguments:
-h, --help show this help message and exit
--arguments ARGUMENTS
arguments for program
--display DISPLAY the display name of the service
--description DESCRIPTION
service description
--start START how the service starts
<boot|system|auto|demand|disabled|delayed-auto>
--obj OBJ the account used to run the service
(default=LocalSystem)
When using --arguments
, make sure you added a double quote around it. Here are some examples:
- Create a service named
service1
with command linepython test.py log.txt
.
srvwrapper service1 python --arguments "test.py log.txt"
- Using absolute program path to create a service.
srvwrapper service2 C:\Python36\python.exe --arguments "\\\"D:\test 1\test.py\\\"" --display "Service 2" --description "A description" --start auto
Step 3:
To start/stop the service, use the net
command
net start service_name
net stop service_name
Uninstall
Use Windows sc
command.
sc delete ServiceName
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for srvwrapper-1.2-py2.py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2b809c649e09df157cb2be2479de1ad2a79ed40b18ce400f71f63123cda897e |
|
MD5 | 8e08f9671f92dd5383695e22feff99a1 |
|
BLAKE2b-256 | ff9b7cdc8a479c3ab6f7711bb87c235e3ff756a74a0ab6c789cab4405c3a01b8 |
Close
Hashes for srvwrapper-1.2-py2.py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93c5a0845ac8d7f4279c7aa24bcb2cea8896396edc88fe9cd7a3ac5f926372bc |
|
MD5 | 4078d1cc8a3d6aca72309732a0a64e54 |
|
BLAKE2b-256 | bbb570530990c42afa358f1b6f86f9f0455b596061d67f40c7ec2b80ea989d73 |