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

相关推荐
程序员龙叔2 小时前
编写高质量 Skill 系列 -- 如何设计需求分析与用例生成的 SKILL
自动化测试·软件测试·python·软件测试工程师·接口测试·性能测试·skill·ai测试
用户8356290780515 小时前
使用 Python 操作 Word 内容控件
后端·python
摇滚侠6 小时前
IDEA 创建 Java 项目 手动整合 SSM 框架
java·ide·intellij-idea
码云骑士6 小时前
32-慢查询排查全流程(下)-索引优化实战与最左前缀原则
python
闵孚龙7 小时前
《PyTorch 深度修炼》Dataset 和 DataLoader:数据如何喂给模型
人工智能·pytorch·python
goldenrolan7 小时前
A公司物料替代测试系统 v1.7:从需求到 exe/apk 的 AI 辅助全链路实践
android·自动化测试·软件测试·python·ai
菜板春7 小时前
jupyter入门-手册-特征探索
python·jupyter
Metaphor6927 小时前
使用 Python 将 PDF 转换为 HTML
python·pdf·html
极光代码工作室8 小时前
基于数据仓库的电商数据分析平台
大数据·hadoop·python·spark·数据可视化