[ 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