windows下sc命令操作window服务程序
admin 阅读:70 2024-03-01
1.安装并启动服务
@echo.服务启动......
@echo off
@sc create ServiceaName binPath= "D:***********.exe" displayname= "中英标题"
@net start ServiceaName
@sc config ServiceaName start= AUTO
@sc description ServiceaName "中英描述"
@echo off
@echo.启动完毕!
@pause2.卸载服务
@echo.服务卸载
@echo off
@net stop ServiceaName
@sc delete ServiceaName
@echo off
@echo.卸载结束!
@pauseLogServiceName为 服务名
sc config 服务名 start=AUTO (自动)
sc config 服务名 start= DEMAND (手动)
sc config 服务名 start= DISABLED(禁用)
net start 服务名 (开启服务)
net stop 服务名(关闭服务)
sc delete 服务名(删除服务)
声明
1、部分文章来源于网络,仅作为参考。 2、如果网站中图片和文字侵犯了您的版权,请联系1943759704@qq.com处理!






