Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to install windows service using batch file

@echo off

SET PROG="c:YourServiceLocationService.exe" SET FIRSTPART=%WINDIR%"Microsoft.NETFrameworkv" 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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #install #windows #service #batch #file
ADD COMMENT
Topic
Name
7+6 =