啟動:net start + 服務名 或 sc start +服務名
停止:net stop + 服務名 或 sc stop +服務名
卸載:sc delete +服務名 或 程序名+ /uninstall
例:對C盤根目錄下的AA.exe(服務名:AA)進行操作的BAT如下:
C:\\aa /install
sc start aa
sc stop aa
c:\\aa /uninstall