winsw 的安装与使用

参考链接

WinSW的安装与使用_winsw.exe-CSDN博客

简介

是由 Jenkins 项目开发的一个开源工具,旨在帮助将任何应用程序或脚本安装为 Windows 服务。它提供了一个简单的方式来管理非 Windows 服务设计的应用程序,使其能够作为 Windows 服务运行。

使用

注:winsw 注册的系统服务默认是开机自启动的,如果想改成手动启动可以在 xml 中 <service> 里面 添加 <startmode>Manual</startmode>

1)下载

Release WinSW v2.12.0 · winsw/winsw · GitHub

2)编写 xml

可改名可不改名,假设改名成 myService.exe,那么 xml 就命名为 myService.xml

3)安装到系统服务

复制代码
# 假设名称为 winsw.exe
winsw.exe install

命令

假设 exe 文件名为 winsw.exe

|---------------------|-------------------|
| 命令 | 说明 |
| winsw.exe install | 注册到系统服务 |
| winsw.exe uninstall | 卸载已经注册进去的系统服务 |
| winsw.exe start | 启动服务【需要已经注册到系统服务】 |
| | |

相关推荐
Byron Loong11 小时前
【调试】Dump 文件分析的完整流程
windows
Geoking.13 小时前
VSCode 安装 Claude Code 插件 + ccswitch 配置 DeepSeek API 完整教程(Windows 新手向)
ide·windows·vscode
潘达斯奈基~14 小时前
Windows 下 Claude Code使用 Agent Teams 配置教程
windows
happymaker062616 小时前
Spring框架学习日记——DAY02(依赖注入的方式)
windows
honder试试16 小时前
Elasticsearch(es)在Windows系统上的安装与部署(含Kibana)
windows·elasticsearch·jenkins
IT里的交易员18 小时前
【系统】Windows 安装 uv
windows·uv
我不是立达刘宁宇19 小时前
windows密码操作
windows
Royzst19 小时前
一、集合概述(前置基础)
开发语言·windows·python
时光追逐者20 小时前
一款基于 C# 开发的 Windows 10/11 系统增强工具,精简、优化、定制一站完成!
开发语言·windows·c#·.net
liuhuizuikeai20 小时前
菜品抽奖活动MFC+服务端
c++·windows·mfc