@echo off

cd\config
set MNU_ERROR=
if exist *.mnu copy *.mnu *.not >NUL
if exist *.mnu del *.mnu >NUL
if "%1"=="en" goto enable_en
if "%1"=="tr" goto enable_tr
if "%1"=="isa" goto enable_isa
if "%1"=="pcmcia" goto enable_pcmcia
goto err_usage

:enable_pcmcia
if not exist c:\ensniff\enpcaddr.exe goto checktr
goto pcmcia_ok

:checktr
if exist c:\trsniff\trpcaddr.exe goto pcmcia_ok
if exist c:\trsniff\trpmaddr.exe goto pcmcia_ok
goto checkwp

:checkwp
if exist c:\wpsniff\enpcaddr.exe goto pcmcia_ok
goto err_nopcmcia

:pcmcia_ok
if exist c:\ensniff\enpcaddr.exe copy en*.not en*.mnu >NUL
if exist c:\trsniff\trpcaddr.exe copy tr*.not tr*.mnu >NUL
if exist c:\trsniff\trpmaddr.exe copy tr*.not tr*.mnu >NUL
if exist c:\wpsniff\enpcaddr.exe copy wp*.not wp*.mnu >NUL
if exist c:\sysniff\hssyaddr.exe copy sy*.not sy*.mnu >NUL
if exist c:\sysniff\hssyaddr.exe copy lm*.not lm*.mnu >NUL
goto done

:enable_en
if exist c:\ensniff\ensniff.exe goto copy_en
if not exist c:\wpsniff\enpcaddr.exe goto err_noensniff

:copy_en
if exist c:\ensniff\enpcaddr.exe copy en*.not en*.mnu >NUL
if exist c:\wpsniff\enpcaddr.exe copy wp*.not wp*.mnu >NUL
goto done

:enable_tr
if not exist c:\trsniff\trsniff.exe goto err_notrsniff
if exist c:\trsniff\trpcaddr.exe copy tr*.not tr*.mnu >NUL
if exist c:\trsniff\trpmaddr.exe copy tr*.not tr*.mnu >NUL
goto done

:enable_isa
copy *.not *.mnu >NUL
if exist c:\ensniff\enpcaddr.exe del en*.mnu >NUL
if exist c:\trsniff\trpcaddr.exe del tr*.mnu >NUL
if exist c:\trsniff\trpmaddr.exe del tr*.mnu >NUL
if exist c:\config\*.mnu goto done 
goto done


:err_nopcmcia
echo no pcmcia ensniff or trsniff
set MNU_ERROR=y
pause
goto done

:err_noensniff
echo no ensniff
set MNU_ERROR=y
pause
goto done

:err_noenmnu
echo no enmnu
pause
set MNU_ERROR=y
goto done


:err_notrsniff
echo no trsniff
set MNU_ERROR=y
pause
goto done


:err_notrmnu
echo no trmnu
set MNU_ERROR=y
pause
goto done


:done
