安装、部署... Windows服务 .net程序 安装 命令

@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

原文地址:https://www.cnblogs.com/cybing/p/6138274.html