winsw/winsw
Fork: 1583 Star: 12157 (更新于 2024-10-23 17:00:32)
license: MIT
Language: C# .
A wrapper executable that can run any executable as a Windows service, in a permissive license.
最后发布版本: v3.0.0-alpha.11 ( 2023-01-29 10:20:04)
Windows Service Wrapper 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.
Why?
See the project manifest.
Supported platforms
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 7.
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 7 system requirements
Supported since Windows 10, version 1607, Windows Server (Core) 2012 R2 and Nano Server, version 1809.
Download
Latest release and pre-release WinSW binaries are available on GitHub Releases.
Alternative sources:
- CI builds are available on Azure Pipelines.
- NuGet. (2.x)
- Maven packaging for executables, hosted by the Jenkins project. Binaries are available here. (2.x)
Get started
Use WinSW as a global tool
- Take WinSW.exe or WinSW.zip from the distribution.
- Write myapp.xml (see the XML config file specification and samples for more details).
- Run
winsw install myapp.xml [options]
to install the service. - Run
winsw start myapp.xml
to start the service. - Run
winsw status myapp.xml
to see if your service is up and running.
Use WinSW as a bundled tool
- Take WinSW.exe or WinSW.zip from the distribution, and rename the .exe to your taste (such as myapp.exe).
- Write myapp.xml (see the XML config file specification and samples for more details).
- Place those two files side by side, because that's how WinSW discovers its co-related configuration.
- Run
myapp.exe install [options]
to install the service. - Run
myapp.exe start
to start the service.
Sample configuration file
You write the configuration file that defines your service. The example below is a primitive example being used in the Jenkins project:
<service>
<id>jenkins</id>
<name>Jenkins</name>
<description>This service runs Jenkins continuous integration system.</description>
<env name="JENKINS_HOME" value="%BASE%"/>
<executable>java</executable>
<arguments>-Xrs -Xmx256m -jar "%BASE%\jenkins.war" --httpPort=8080</arguments>
<log mode="roll"></log>
</service>
The full specification of the configuration file is available here. You can find more samples here.
Usage
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. |
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.
Documentation
- Migrate to WinSW 3.x
- Configuration:
- Use cases:
Contributing
Contributions are welcome! See the contributing guidelines for more information.
License
WinSW is licensed under the MIT license.
最近版本更新:(数据更新于 2024-11-05 17:50:21)
2023-01-29 10:20:04 v3.0.0-alpha.11
2023-01-29 00:22:38 v2.12.0
2021-08-09 13:54:00 v3.0.0-alpha.10
2021-04-09 14:14:04 v3.0.0-alpha.9
2021-03-18 01:42:36 v2.11.0
2021-03-17 02:26:32 v3.0.0-alpha.8
2020-12-24 03:49:39 v3.0.0-alpha.7
2020-11-16 00:02:12 v3.0.0-alpha.6
2020-10-22 21:42:59 v3.0.0-alpha.5
2020-10-17 13:30:31 v2.10.3
主题(topics):
csharp, dotnet, nuget, windows-service, windows-service-wrapper
winsw/winsw同语言 C#最近更新仓库
2024-11-04 20:01:02 Pik-4/HsMod
2024-11-03 23:57:50 jellyfin/jellyfin
2024-10-31 10:00:36 metatube-community/jellyfin-plugin-metatube
2024-10-30 03:58:07 AlchlcDvl/TownOfUsReworked
2024-10-26 07:18:02 Azure/azure-sdk-for-net
2024-10-23 06:18:57 PowerShell/PowerShell