@echo off
setlocal
%~d0
cd %~dp0
set MICS_HOME=%~dp0
set MICS_HOME=%MICS_HOME:~0,-1%

if not exist "%MICS_HOME%\bis" goto ERROR
echo starting MICS, please wait...
start "mics" "%MICS_HOME%\jre\bin\javaw.exe" -Xmx768m -jar "%MICS_HOME%\mics.jar" -standalone %* 
goto END
:ERROR 
echo MICS is not configured, please run %MICS_HOME%\micsupdate.bat first
:END
endlocal