@echo OFF
:: Test-run HELLO.COM

:: First check if the source has been compiled
if exist HELLO.COM goto GoOn

if exist HELLO.C-- goto HelloOK
echo.
echo   HELLO.C-- not present in current directory...
echo.
pause
goto TheEnd

:HelloOK
:: If not then compile it
C-- HELLO.C--
if exist HELLO.COM goto GoOn

echo.
echo   An error accoured by compiling...
echo.
pause
goto TheEnd

:GoOn
:: Save LANG and NLSPATH before clearing them
set LANG_OLD=%LANG%
set LANG=
set NLSPATH_OLD=%NLSPATH%
set NLSPATH=

echo.
echo Default strings (inside executable):
HELLO.COM
echo.
pause

echo.
echo English text (from HELLO.EN):
set LANG=EN
set NLSPATH=.\
HELLO.COM
echo.
pause

echo.
echo Estonian text (from HELLO.ET):
set LANG=ET
HELLO.COM
echo.
pause

:: Restore LANG/NLSPATH
set LANG=%LANG_OLD%
set LANG_OLD=
set NLSPATH=%NLSPATH_OLD%
set NLSPATH_OLD=

:TheEnd
