home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
pcmag
/
vol7n18.arc
/
PCNET.BAT
< prev
next >
Wrap
DOS Batch File
|
1988-07-18
|
2KB
|
74 lines
echo off
rem /* decode argument - determine what user wants to do */
:BEGIN
if .%1 == . goto DEFAULT
if %1 == c goto CONNECT
if %1 == C goto CONNECT
if %1 == d goto DETACH
if %1 == D goto DETACH
if %1 == s goto START
if %1 == S goto START
if %1 == v goto VIEW
if %1 == V goto VIEW
rem /* no argument - give list of options */
:DEFAULT
echo
echo Please Enter One of the Following NETS Commands
echo
echo NETS C - To connect to network devices
echo NETS D - To disconnect from network devices
echo NETS S - To start network and connect to network devices
echo NETS V - To view list of connected network devices
goto END
rem /* show list of network devices currently connected */
:VIEW
net use
goto END
rem /* start network and connect to network devices */
:START
echo
echo Starting PC as Receiver on Network
cd \network
loadniu -r -d niuws.xfm stdlc > NUL
niubios > NUL
net start rcv USER > NUL
if errorlevel 1 goto ERROR1
goto CONNECT
rem /* connect to network devices */
:CONNECT
echo
echo Connecting PC to Network Devices
net use E: \\server\apps password > NUL
if errorlevel 1 goto ERROR2
net use lpt2: \\server\laser password > NUL
if errorlevel 1 goto ERROR2
goto END
rem /* detach from network devices */
:DETACH
echo
echo Disconnecting PC from Network Devices
net use E: /d > NUL
net use lpt2: /d > NUL
goto END
rem /* network system did not start properly */
:ERROR1
cls
echo Network failed to start properly !!!
pause
goto END
rem /* could not connect to network device */
:ERROR2
cls
echo Network Connection Failed !!!!
echo Contact System Administrator
pause
goto END
:END