首页 > 技术文章 > Windows服务安装批处理命令

s0611163 2019-06-12 08:52 原文

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

 

推荐阅读