A wrapper executable that can run any executable as a Windows service, in a permissive license.
WinSW wraps and manages any application as a Windows service.
We are actively developing WinSW 3. Please refer to the v2 branch for previous version documentation.
See the project manifest.
WinSW 3 can run on Windows platforms with .NET Framework 4.6.1 or later versions installed. For systems without .NET Framework, the project provides native 64-bit and 32-bit executables based on .NET Core.
More executables can be added upon request.
.NET Framework system requirements\ Preinstalled since Windows 10, version 1511 and Windows Server 2016.\ Installable since Windows 7 SP1 and Windows Server 2008 R2 SP1.
.NET 5 system requirements\ Supported since Windows 7 SP1, Windows Server (Core) 2012 R2 and Nano Server, version 1809.
Latest release and pre-release WinSW binaries are available on GitHub Releases.
winsw install myapp.xml [options]to install the service.
winsw start myapp.xmlto start the service.
winsw status myapp.xmlto see if your service is up and running.
myapp.exe install [options]to install the service.
myapp.exe startto start the service.
You write the configuration file that defines your service. The example below is a primitive example being used in the Jenkins project:
jenkins Jenkins This service runs Jenkins continuous integration system. java -Xrs -Xmx256m -jar "%BASE%\jenkins.war" --httpPort=8080
WinSW is being managed by the XML configuration file.
Your renamed WinSW.exe binary also accepts the following commands:
| Command | Description | | ------- | ----------- | | install | Installs the service. | | uninstall | Uninstalls the service. | | start | Starts the service. | | stop | Stops the service. | | restart | Stops and then starts the service. | | status | Checks the status of the service. | | refresh | Refreshes the service properties without reinstallation. | | customize | Customizes the wrapper executable. | | dev | Experimental commands. |
| Command | Description | | ------- | ----------- | | dev ps | Draws the process tree associated with the service. | | dev kill | Terminates the service if it has stopped responding. | | dev list | Lists services managed by the current executable. |
Most commands require Administrator privileges to execute. WinSW will prompt for UAC in non-elevated sessions.
Contributions are welcome! See the contributing guidelines for more information.
WinSW is licensed under the MIT license.