目录

工欲善其事

实践出真知

活跃标签: linux java mysql 待分类 js springboot win10 电路 vue macOS nginx esp32 windows git docker idea maven esp8266 python Arduino

存档:

X

[ 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:\TeldAPP\Monitor\windows_exporter\config.yml
cmd

2、sc命令进行注册

sc create windows_exporter binPath= C:\TeldAPP\Monitor\windows_exporter\windows_exporter.bat start= auto
[SC] CreateService 成功

3、删除已注册服务

sc delete servivename

标题:[ Windows ] 将bat文件注册为windows服务
作者:llilei
地址:http://solo.llilei.work/articles/2023/08/28/1693217378813.html