[转帖]Windows Service Wrapper

windows,service,wrapper · 浏览次数 : 0

小编点评

## Why WinSW 3 is wrapped in a permissive license? * **MIT License:** The WinSW 3 project is licensed under the MIT License, which is a copyleft license that allows for free use, modification, and distribution with minimal restrictions. This license ensures that the project remains open-source and that its contributors have the rights to use and distribute the software for any purpose. * **Permissive nature:** The license is permissive in nature, which means that it allows for the project to be used in various ways without requiring users to comply with specific terms of use. This makes it suitable for a wide range of applications, including those with commercial or non-commercial aims. * **Flexibility:** The license allows for the project to be used on various platforms and with different configurations. This flexibility makes it a versatile tool that can be used for a variety of purposes. ## Key points to consider: * The license is a "permissive" license, not an "open source" license. This means that the project can be used for both commercial and non-commercial purposes without requiring the source code to be open-sourced. * The license allows for modifications and redistribution of the software, but it requires that the original copyright notice be preserved. * The license is compatible with various other open-source licenses, which allows for greater flexibility in terms of combining and distributing the software with other components. Overall, the permissive license for WinSW 3 allows for the project to be used in various ways without requiring users to comply with specific terms of use, making it suitable for a wide range of applications.

正文

Windows Service Wrapper in a permissive license

Github All Releases GitHub Release NuGet Build Status Deployment Status Gitter 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 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.

Download

Latest release and pre-release WinSW binaries are available on GitHub Releases.

Alternative sources:

Get started

Use WinSW as a global tool

  1. Take WinSW.exe or WinSW.zip from the distribution.
  2. Write myapp.xml (see the XML config file specification and samples for more details).
  3. Run winsw install myapp.xml [options] to install the service.
  4. Run winsw start myapp.xml to start the service.
  5. Run winsw status myapp.xml to see if your service is up and running.

Use WinSW as a bundled tool

  1. Take WinSW.exe or WinSW.zip from the distribution, and rename the .exe to your taste (such as myapp.exe).
  2. Write myapp.xml (see the XML config file specification and samples for more details).
  3. Place those two files side by side, because that's how WinSW discovers its co-related configuration.
  4. Run myapp.exe install [options] to install the service.
  5. 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:

CommandDescription
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:

CommandDescription
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

Contributing

Contributions are welcome! See the contributing guidelines for more information.

License

WinSW is licensed under the MIT license.

与[转帖]Windows Service Wrapper相似的内容:

[转帖]Windows Service Wrapper

Windows Service Wrapper in a permissive license WinSW wraps and manages any application as a Windows service. We are actively developing WinSW 3. Plea

[转帖]Windows Server 2022 简体中文版、英文版下载 (updated Oct 2022)

https://sysin.org/blog/windows-server-2022/ Windows Server 2022 正式版,2022 年 10 月更新,VLSC Posted by sysin on 2022-10-27 Estimated Reading Time 8 Minutes

[转帖]Windows Server 2025 简体中文版下载(Inside Preview),下一代 Windows 11 Server

https://sysin.org/blog/windows-server-2025/ 我们知道 Windows Server 2022 仍然属于 Windows 10 Server 的范畴。现在,下一代基于 Windows 11 的 Windows Server 已经可以公开下载,根据 A3 的产

[转帖]Windows Server 2016与旧版本系统比较

一、性能和可扩性 特征描述 Windows Server 2012/2012 R2 标准版和数据中心 Windows Server 2016 标准版和数据中心 物理内存(主机)支持 每个物理服务器至多为 4TB 每个物理服务器至多为 24TB (6x) 物理(主机)逻辑处理器支持 至多为 320 L

[转帖]【Windows】将bat文件注册为windows服务

1、编写服务的bat文件 @echo off C: cd C:\TeldAPP\Monitor\windows_exporter C:\TeldAPP\Monitor\windows_exporter\windows_exporter-0.16.0-386.exe --config.file=C:\

[转帖]Windows的sc命令详解

https://www.codenong.com/cs106052166/ 命令帮助 在dos窗口输入sc即可 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515

[转帖]Windows sc 命令

语法# sc [] config [] [optionname= optionvalues] 注意 每个命令行选项 (参数) 必须包含等号作为选项名称的一部分。 选项及其值之间需要一个空格 (例如 ,type= own。 如果省略空格,操作将失败)。

[转帖]Windows Server 2012/2016/2019的任务管理器中不显示硬盘

https://www.jianshu.com/p/70f67a16e3cb 1.Win+R 打开CMD(不是管理员的话请以管理员身份打开) 2.输入以下命令 diskperf -y image.png

[转帖]Windows小窍门集合(持续更新)

https://blog.csdn.net/rockage/article/details/113543491 iPhone与Windows 10文件互传 Windows设置: 1. 新建一个文件夹,名称随意,比如Share 2. 鼠标右键点击文件夹Share,选 【授予访问权限】-> 【特定用户】

[转帖]Windows根证书的批量导出和导入

# POWERSHELL批量导出 Get-ChildItem -Path Cert:\LocalMachine\Root\ |ForEach-Object {Export-Certificate -Cert $_ -FilePath ($env:USERPROFILE + "\Desktop\新建文