@echo off
if %netdir16%.==. goto nonetdir
if %nic16%.==. goto nonetcard
set env_1=%nic16%
set env_2=%netdir16%
for %%a in (u U) do if %1.==%%a. goto unload
for %%a in (u U) do if %1.==/%%a. goto unload
if not %nwclient%.==. goto bereits_geladen
if %ipx%.==1. if %nwclient%.==. goto shell
if %tcpip%.==1. if %nwclient%.==. goto shell
set netcfg=%env_2%\%env_1%.CFG
lh /l:1 %env_2%\LSL /C=%netcfg%>%Temp%\netdrv.log
lh %env_2%\%env_1%>>%Temp%\netdrv.log
if errorlevel 1 goto notfound
lh %env_2%\IPXODI>>%Temp%\netdrv.log
set ipx=1
echo.
echo    IPX bound to %nic16%.
echo    Frame=Ethernet_II
echo.
goto end

:nonetcard
echo.
echo    No NIC defined !
echo    Set the variable NIC16 like your network card!
echo.
goto end

:notfound
echo.
echo    %env_1% not found !
echo.
%env_2%\lsl u
echo.
goto end

:nonetdir
echo.
echo    Kein Client Verzeichnis definiert!
echo.
goto end

:unload
c:
if %ipx%.==1. %env_2%\ipxodi /u>>%Temp%\netdrv.log
set ipx=
%env_2%\%env_1% /u>>%Temp%\netdrv.log
%env_2%\lsl /u
goto end

:end
:resetenv
set env_1=
set env_2=
