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

相关推荐
花酒锄作田8 小时前
Postgres - Listen/Notify构建轻量级发布订阅系统
python·postgresql
Thomas.Sir8 小时前
第二章:LlamaIndex 的基本概念
人工智能·python·ai·llama·llamaindex
m0_694845579 小时前
Dify部署教程:从AI原型到生产系统的一站式方案
服务器·人工智能·python·数据分析·开源
李昊哲小课10 小时前
Python办公自动化教程 - 第7章 综合实战案例 - 企业销售管理系统
开发语言·python·数据分析·excel·数据可视化·openpyxl
不知名的老吴10 小时前
返回None还是空集合?防御式编程的关键细节
开发语言·python
【ql君】qlexcel10 小时前
Visual Studio Code的使用,VS code常用扩展
ide·vscode·编辑器·visual studio·扩展
李昊哲小课11 小时前
Python办公自动化教程 - 第5章 图表创建 - 让数据可视化
python·信息可视化·数据分析·数据可视化·openpyxl
chushiyunen11 小时前
python pygame实现贪食蛇
开发语言·python·pygame
Dream of maid11 小时前
Python-基础2(流程控制)
python
Lenyiin12 小时前
《Python 修炼全景指南:一》从环境搭建到第一个程序
开发语言·python