Nuitka-winsvc User Manual
Nuitka-winsvc is a forked version of Nuitka, it supports compiling EXE as a Windows service.
Install
You can install Nuitka-winsvc by pip:
pip install nuitka-winsvc
Usage
In addition to supporting all the command line arguments of Nuitka, Nuitka-winsvc also provides 7 additional arguments for compiling the Windows services:
--windows-serviceEnable Windows service mode, works only when compiling for Windows and onefile mode enabled.--windows-service-nameName of the Windows service. If not provided, the target program name will be used as the service name.--windows-service-display-nameDisplay name of the Windows service. If not provided, the product name will be attempted to use.--windows-service-descriptionDescription of the Windows service. If not provided, the file description will be attempted to use.--windows-service-cmdlineAdditional command line arguments that will be passed to the service, such as--config config.json --output output.log.--windows-service-installWindows service installation command-line argument. Default value isinstall.--windows-service-uninstallWindows service uninstallation command-line argument. Default value isuninstall.
Use the following command to build a Windows service:
python -m nuitka --onefile --output-dir=build --windows-service --windows-service-name=myservice --windows-service-display-name="My Service" --windows-service-description="This is the description of my service" --windows-service-cmdline="-c config.yml -o output.log" --windows-service-install=install --windows-service-uninstall=uninstall main.py
When the python program is compiled successfully, you can use the following command to install the service:
.\main.exe install
Also you can use the following command to uninstall the service:
.\main.exe uninstall
Note: Administrator privileges is required when installing and uninstalling the Windows services. You should run the above commands as administrator.
The compiled EXE executable file can be run both as a Windows service and as a regular Windows program. However, it is important to note that the Windows service installation and uninstallation command-line arguments which specified by --windows-service-install and --windows-service-uninstall of Nuitka-winsvc compilation arguments will override the original behavior of the program. Therefore, the compiled Python program should avoid using the same command line arguments.
Metadata
Release files for Nuitka-winsvc 4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nuitka_winsvc-4.2.tar.gz | 4.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nuitka_winsvc-4.2-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details |
Total release size: 9.1 MB
Release files / nuitka_winsvc-4.2.tar.gz
| Download URL | nuitka_winsvc-4.2.tar.gz |
|---|---|
| Size | 4.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e5d6bce2d66990df55c73b363b8c327bfb41f3873ba50690ec31c2ff1ae4970
|
|
BLAKE2b-256 checksum How to use checksums |
bb123f27c4014bbdeb0e899d2d08962f3d1afdde7420b56e024d8affd870d88c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / nuitka_winsvc-4.2-cp314-cp314-win_amd64.whl
| Download URL | nuitka_winsvc-4.2-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a075a7006bbf65814b582302b346d3c31d5b78e270645c925fc37363075d5d06
|
|
BLAKE2b-256 checksum How to use checksums |
f1724ab598390b91605c56ee4edc8482e17f61dde30d0809b187119c43d3e270
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|