@echo off
setlocal
set errorlevel=0
set errorlevel=
cls

if not defined StaticApplications_Root goto STATIC_APPLICATIONS_NOT_DEF
if not defined USERPROFILE             goto USERPROFILE_NOT_DEF

echo * Starting Far Manager ...
start "Far Manager" /D "%USERPROFILE%" "%StaticApplications_Root%\Startup\Far Manager\Far Manager 3 x64.lnk"
if %errorlevel% neq 0 goto ERROR

goto :EOF

:STATIC_APPLICATIONS_NOT_DEF
echo.
echo ## Environment variable is not defined: "StaticApplications_Root".
goto ERROR

:USERPROFILE_NOT_DEF
echo.
echo ## Environment variable is not defined: "USERPROFILE".
goto ERROR

:ERROR
echo 
pause
EXIT 255
