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命令进行注册
cmd执行
sc create windows_exporter binPath= C:\TeldAPP\Monitor\windows_exporter\windows_exporter.bat start= auto
[SC] CreateService 成功
3、删除已注册服务
sc delete servivename
</article>