1、安裝服務
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe D:\WiseMES\MES.WindowsService.exe Net Start AOIService sc config AOIService start= auto pause
2、卸載服務
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe /u D:\WiseMES\MES.WindowsService.exe pause
3、命令參數說明
net start 服務名 //啟動服務 net stop 服務名 //停止服務 用sc可打開被禁用的服務,語法是:【Start=號后面有空格】 sc config 服務名 start= demand //手動 sc config 服務名 start= auto //自動 sc config 服務名 start= disabled //禁用 sc start 服務名 sc stop 服務名