echo off

if not exist llra1.exe goto NOFILES
if not exist llra2.exe goto NOFILES
if not exist llra3.exe goto NOFILES

llra2 /# %1

if errorlevel 3 goto LLCMD
if errorlevel 2 goto UNINSTC
if errorlevel 1 goto UNINSTNC

llra1
llra2
llra3 %1 %2 %3
if errorlevel 1 goto END
if not exist llra4.exe goto end
llra4
goto END

:NOFILES
echo ÿ
echo Cannot run LapLink Remote Access because one (or more) files are missing.
echo ÿ
goto END

:LLCMD
llra3 %1
goto END

:UNINSTC
llra4 /u
:UNINSTNC
llra3 /u
if errorlevel 1 goto END
llra2 /u
llra1 /u

:END
echo ÿ
