@ECHO OFF
REM
REM This batch file will set (and overwrite) some environment variables when
REM called directly from the commandline or from a batch file.
REM
REM When called using '%COMSPEC% /C' the environment will not be changed.
REM On older Windows Systems like WIndows95 and Windows98 the errorlevel cannot
REM checked after calling this batch file.  
REM

REM
REM Setting Parameters
REM
SET BICSUITE_BATCH_PARAMETERS=%1
:NEXT_PARAMETER
SHIFT
IF [%1]==[] GOTO END_PARAMETERS
SET BICSUITE_BATCH_PARAMETERS=%BICSUITE_BATCH_PARAMETERS% %1
GOTO NEXT_PARAMETER
:END_PARAMETERS

CALL COMMON.BAT
IF [%ERRORLEVEL%]==[0] GOTO PAST_COMMON
SET BICSUITE_BATCH_EXITCODE=%ERRORLEVEL%
GOTO DOEXIT

:PAST_COMMON
SET BICSUITE_BATCH_EXITCODE=0
SET ERRORLEVEL=
REM
REM Run it
REM
"%BICSUITEJAVA_TL%" %BICSUITEJAVAFLAGS_TL% -cp "%BICSUITEJAR%" de.independit.scheduler.tools.set_variable %BICSUITE_BATCH_PARAMETERS%
IF ERRORLEVEL 1 SET BICSUITE_BATCH_EXITCODE=1

:DOEXIT
REM
REM Exit depending on windows version
REM
IF [%WIN_VERSION%]==[WIN_NT] EXIT /B %BICSUITE_BATCH_EXITCODE% >NUL
SET ERRORLEVEL=%BICSUITE_BATCH_EXITCODE%

