WinSW is an executable binary, which can be used to wrap and manage a custom process as a Windows service. Once you download the installation package, you can rename WinSW.exe to any name, e.g. MyService.exe.
See the project manifest.
WinSW offers executables for .NET Framework 2.0, 4.0 and 4.6.1. It can run on Windows platforms which have these versions of .NET Framework installed. For systems without .NET Framework, the project provides native 64-bit and 32-bit executables which are based on .NET Core 3.1.
More executables can be added upon request.
Your renamed WinSW.exe binary also accepts the following commands:
installto install the service to Windows Service Controller. This command requires some preliminary steps described in the Installation guide.
uninstallto uninstall the service. The opposite operation of above.
startto start the service. The service must have already been installed.
stopto stop the service.
stopwaitto stop the service and wait until it's actually stopped.
restartto restart the service. If the service is not currently running, this command acts like
statusto check the current status of the service.
NonExistentindicates the service is not currently installed
Startedto indicate the service is currently running
Stoppedto indicate that the service is installed but not currently running.
Most commands require Administrator privileges to execute. Since v2.8, WinSW will prompt for UAC in non-elevated sessions.
Contributions are welcome! No Contributor License Agreement is needed, just submit your pull requests. See the contributing guidelines for more information.
WinSW is licensed under the MIT license.