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.启动完毕!
@pause

2.卸载服务

@echo.服务卸载  

@echo off
@net stop ServiceaName
@sc delete ServiceaName
@echo off
@echo.卸载结束!
@pause

LogServiceName为 服务名

sc config 服务名 start=AUTO (自动)

sc config 服务名 start= DEMAND (手动)

sc config 服务名 start= DISABLED(禁用)

net start 服务名 (开启服务)

net stop 服务名(关闭服务)

sc delete 服务名(删除服务)