2004-08-19 04:48:42 +00:00
|
|
|
@echo off
|
|
|
|
setlocal
|
|
|
|
|
|
|
|
rem
|
|
|
|
rem Java Service Wrapper general NT service install script
|
|
|
|
rem
|
|
|
|
|
|
|
|
if "%OS%"=="Windows_NT" goto nt
|
|
|
|
echo This script only works with NT-based versions of Windows.
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
:nt
|
|
|
|
rem
|
|
|
|
rem Find the application home.
|
|
|
|
rem
|
|
|
|
rem %~dp0 is location of current script under NT
|
|
|
|
set _REALPATH=%~dp0
|
2004-08-19 05:41:36 +00:00
|
|
|
set _WRAPPER_EXE=%_REALPATH%I2Psvc.exe
|
2004-08-19 04:48:42 +00:00
|
|
|
|
|
|
|
rem
|
|
|
|
rem Find the wrapper.conf
|
|
|
|
rem
|
|
|
|
:conf
|
|
|
|
set _WRAPPER_CONF="%~f1"
|
|
|
|
if not %_WRAPPER_CONF%=="" goto startup
|
2004-09-09 02:26:42 +00:00
|
|
|
set _WRAPPER_CONF="%_REALPATH%wrapper.config"
|
2004-08-19 04:48:42 +00:00
|
|
|
|
|
|
|
rem
|
|
|
|
rem Install the Wrapper as an NT service.
|
|
|
|
rem
|
|
|
|
:startup
|
|
|
|
"%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
|
|
|
|
if not errorlevel 1 goto :eof
|
|
|
|
pause
|
|
|
|
|