@echo off
Installutil.exe 程序目录 F: estTestWindows.exe 服务程序目录
@sc start "服务名称"
@sc config "服务名称" start= 启动方式:AUTO
@echo off
@echo 服务安装并启动完成
pause
示例:
@echo off
C:WindowsMicrosoft.NETFrameworkv4.0.30319InstallUtil.exe F: estTestWindows.exe
@sc start "Test Windows"
@sc config "TestWindows" start= AUTO
@echo off
@echo 服务安装并启动完成
pause