| Line | |
|---|
| 1 | @echo off
|
|---|
| 2 | setlocal
|
|---|
| 3 |
|
|---|
| 4 | rem
|
|---|
| 5 | rem Java Service Wrapper general NT service install script
|
|---|
| 6 | rem
|
|---|
| 7 |
|
|---|
| 8 | if "%OS%"=="Windows_NT" goto nt
|
|---|
| 9 | echo This script only works with NT-based versions of Windows.
|
|---|
| 10 | goto :eof
|
|---|
| 11 |
|
|---|
| 12 | :nt
|
|---|
| 13 | rem
|
|---|
| 14 | rem Find the application home.
|
|---|
| 15 | rem
|
|---|
| 16 | rem %~dp0 is location of current script under NT
|
|---|
| 17 | set _REALPATH=%~dp0
|
|---|
| 18 | set _WRAPPER_EXE=%_REALPATH%I2Psvc.exe
|
|---|
| 19 |
|
|---|
| 20 | rem
|
|---|
| 21 | rem Find the wrapper.conf
|
|---|
| 22 | rem
|
|---|
| 23 | :conf
|
|---|
| 24 | set _WRAPPER_CONF="%~f1"
|
|---|
| 25 | if not %_WRAPPER_CONF%=="" goto startup
|
|---|
| 26 | set _WRAPPER_CONF="%_REALPATH%wrapper.config"
|
|---|
| 27 |
|
|---|
| 28 | rem
|
|---|
| 29 | rem Install the Wrapper as an NT service.
|
|---|
| 30 | rem
|
|---|
| 31 | :startup
|
|---|
| 32 | "%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
|
|---|
| 33 | if not errorlevel 1 goto :eof
|
|---|
| 34 | if %2=="--nopause" goto :eof
|
|---|
| 35 | pause
|
|---|
| 36 |
|
|---|
| 37 | :eof
|
|---|