Windows服务安装批处理命令

Install.bat:

@echo off
"%~dp0InstallUtil\InstallUtil.exe" "%~dp0DataSyncService.exe"
%SystemRoot%\system32\sc config DataSyncService start= auto
%SystemRoot%\system32\sc config DataSyncService type= interact type= own
Pause
View Code

StartService.bat:

@echo off
%SystemRoot%\system32\net start DataSyncService
pause
View Code

StopService.bat:

@echo off
%SystemRoot%\system32\net stop DataSyncService
pause
View Code

Uninstall.bat:

@echo off
"%~dp0InstallUtil\InstallUtil.exe" "%~dp0DataSyncService.exe" /u
pause
View Code

 

posted @ 2019-06-12 08:52  0611163  阅读(423)  评论(0编辑  收藏  举报