echo off
cd %VAR%
..\..\..\util\setconsole.exe /reset
echo.
echo Press 1 to play Impossible Mission II in CGA mode
echo Press 2 to play Impossible Mission II in Tandy mode
echo Press 3 to play Impossible Mission II in EGA mode
echo Press 4 to play Impossible Mission II in VGA mode
echo.
..\..\..\util\choice /C:1234 /N Please Choose:

if errorlevel = 4 goto VGA
if errorlevel = 3 goto EGA
if errorlevel = 2 goto TAN
if errorlevel = 1 goto CGA

:CGA
..\..\..\util\setconsole.exe /minimize
cd ..
cd ..
cd ..
".\emulators\dosbox\%dosbox%" -conf "%var%\dosbox_cga.conf" -conf ".\emulators\dosbox\options.conf" -conf %conf% -noconsole -exit -nomenu
del stdout.txt
del stderr.txt
if exist glide.* del glide.*
if exist .\eXoDOS\CWSDPMI.swp del .\eXoDOS\CWSDPMI.swp
goto end

:TAN
..\..\..\util\setconsole.exe /minimize
cd ..
cd ..
cd ..
".\emulators\dosbox\%dosbox%" -conf "%var%\dosbox_tandy.conf" -conf ".\emulators\dosbox\options.conf" -conf %conf% -noconsole -exit -nomenu
del stdout.txt
del stderr.txt
if exist glide.* del glide.*
if exist .\eXoDOS\CWSDPMI.swp del .\eXoDOS\CWSDPMI.swp
goto end

:EGA
..\..\..\util\setconsole.exe /minimize
cd ..
cd ..
cd ..
".\emulators\dosbox\%dosbox%" -conf "%var%\dosbox_ega.conf" -conf ".\emulators\dosbox\options.conf" -conf %conf% -noconsole -exit -nomenu
del stdout.txt
del stderr.txt
if exist glide.* del glide.*
if exist .\eXoDOS\CWSDPMI.swp del .\eXoDOS\CWSDPMI.swp
goto end

:VGA
..\..\..\util\setconsole.exe /minimize
cd ..
cd ..
cd ..
".\emulators\dosbox\%dosbox%" -conf "%var%\dosbox.conf" -conf ".\emulators\dosbox\options.conf" -conf %conf% -noconsole -exit -nomenu
del stdout.txt
del stderr.txt
if exist glide.* del glide.*
if exist .\eXoDOS\CWSDPMI.swp del .\eXoDOS\CWSDPMI.swp
goto end