📌  相关文章
📜  如何使用批处理文件安装 Windows 服务 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:18.261000             🧑  作者: Mango

代码示例1
@echo off

SET PROG="c:\YourServiceLocation\Service.exe" SET FIRSTPART=%WINDIR%"\Microsoft.NET\Framework\v" SET SECONDPART="\InstallUtil.exe" SET DOTNETVER=4.0.30319 IF EXIST %FIRSTPART%%DOTNETVER%%SECONDPART% GOTO install

GOTO fail :install ECHO Found .NET Framework version %DOTNETVER% ECHO Installing service %PROG% %FIRSTPART%%DOTNETVER%%SECONDPART% %PROG% GOTO end :fail echo FAILURE -- Could not find .NET Framework install :param_error echo USAGE: installNETservie.bat [install type (I or U)] [application (.exe)] :end ECHO DONE!!! Pause