服务创建&删除

创建服务.bat

@echo.服务启动......  
@echo off  
@sc create BestoneProductEditSvc binPath= "D:winSvcBestoneProductEditSvcBestoneProductEditSvc.exe"  
@net start BestoneProductEditSvc  
@sc config BestoneProductEditSvc start= AUTO  
@echo off  
@echo.启动完毕!  
@pause 

删除服务.bat

@echo.服务删除  
@echo off  
@sc delete BestoneProductEditSvc  
@echo off  
@echo.删除结束!  
@pause  
BestoneProductEditSvc:服务名
binPath:程序目录
原文地址:https://www.cnblogs.com/xiaoxiaoyu0707/p/10468917.html