NSSM和WinSW把exe注册成服务,sc可以操作服务 sc query xx服务名字

NSSM和WinSW把exe注册成服务,sc可以操作服务 sc query xx服务名字

NSSM下载地址:NSSM - the Non-Sucking Service Manager http://www.nssm.cc/release/nssm-2.24.zip

WinSW下载地址:Releases · winsw/winsw · GitHub

1、根据需要注册的系统,64系统使用WinSW-x64.exe或者32系统使用WinSW-x86.exe

2、复制WinSW-x64.exe或者WinSW-x86.exe到需要注册的目录,把名称修改为需要注册的名字(名字随意)

3、

例如:nginx.exe 需要注册到服务中(64系统使用WinSW-x64.exe)

1、修改WinSW-x64.exe为nginxService.exe

2、修改sample-minimal.xml为nginxService.xml(nginxService.exe与nginxService.xml必须同一目录)

3、nginxService.xml中内容如下

4、在nginxService.exe当前目录中进入cmd ,执行nginxService.exe install,服务中就有了

nginxService.xml中内容如下

nginxService123

nginxService

nginx服务的描述

nginx.exe

java注册666.jar注册到服务,有参数

例如:jar需要注册到服务中(64系统使用WinSW-x64.exe)

1、修改WinSW-x64.exe为javaService.exe

2、修改sample-minimal.xml为javaService.xml(java.exe与javaService.xml必须同一目录)

3、javaService.xml中内容如下

4、在javaService.exe当前目录中进入cmd ,执行javaService.exe install,服务中就有了

javaService.xml中内容如下

javaService123

javaService

jar服务的描述

java

-jar 666.jar

相关推荐
黑客笔记6 小时前
python小工具win7翻车事故现场
python
岁月宁静8 小时前
从零拆解 AI 语音模拟面试系统
人工智能·python·agent
benchmark_cc9 小时前
个人开发者接入五档盘口:用 QuantDash 读取单只股票的验收清单与易错点
python·数据分析·pandas·量化交易·股票数据·quantdash
ZhengEnCi10 小时前
项目越写越乱?先别改架构:用一次目录重排 + 一份可复算的体检脚本把乱治住
python·架构·ai编程
Dmz丶11 小时前
前端转 AI 100 天 Day 45:阶段复盘——从“会调 API”到“做出 AI 产品”
python
Sakura_j_h_11 小时前
MCP SDK 2.0 实战:用 MCPServer 搭本地笔记检索服务
开发语言·笔记·python·qt·ai工具·mcp·mcpserver
QuZhengRong12 小时前
【AI】Agent 全栈进阶|AgentScope 沙箱源码解析
python·学习·ai·agent·沙箱
Eider199812 小时前
Python基础语法之并发相关3
开发语言·python
M--Y13 小时前
LangGraph 架构基石:持久化与运行控制
python·langchain·大模型·llm·持久化·langgraph