@echo off
SET mypath=%~dp0

rem change to drive
%~d0

rem change to correct path
cd %mypath%

for /f %%i in ('dir /b %mypath%xiFDR*.jar') do set xifdr=%%i

rem start xi
java -Dfile.encoding=UTF-8 -Xmx3g -jar %xifdr%

rem if xi crashed keep the window open
if NOT ["%errorlevel%"]==["0"] (
     pause
     exit /b %errorlevel%
)
exit

