home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.msdos.misc:6230 comp.sys.ibm.pc.misc:14846
- Path: sparky!uunet!utcsri!utgpu!attcan!john
- From: john@attcan.UUCP (John Benfield)
- Newsgroups: comp.os.msdos.misc,comp.sys.ibm.pc.misc
- Subject: Re: Detecting network cards
- Message-ID: <19259@vpk1.UUCP>
- Date: 20 Nov 92 14:44:16 GMT
- References: <1992Nov17.100750.8778@iscsvax.uni.edu>
- Organization: AT&T Canada - MIS Network Development
- Lines: 64
-
- In article <1992Nov17.100750.8778@iscsvax.uni.edu>, kraai4712@iscsvax.uni.edu writes:
- > I'm working with a number of PCs (mostly PS/2s) and need a way to detect
- > network cards. What I'd like to do is have the autoexec.bat log the user in
- > (Novell Netware) if they are connected, and not even try if they're not.
- > Checking for specific software on the local PC is not an option.
- >
- > This would be nice, as I install the Novell software up to a month before the
- > hardware end of our unit gets around to installing the cards and bringing the
- > network connection up.
-
- That's an easy one. Just trap the return code from your first loaded
- driver and check to see if it successfully loaded. If not, jump past
- loading any other drivers. For example:
-
- -----------------------------
- ECHO off
- cls
-
- REM Load the first driver...
- loadme /first /gag_on_err
-
- REM check to see if the driver reported an error (you may
- REM have to check your manual if the driver uses non-standard
- REM return codes.
- if ERRORLEVEL 5 GOTO no_network_card
-
- REM if no error, just load the rest of the drivers
- ldthis2
- loadmore
- andmore
- stillmor
-
-
- REM skip past the extra drivers if there was a problem.
- :no_network_card
- load /post_network_stuff
- mouse /no_squeak
- mode com9:153600,n,8,1,p,eieio
- win /eat_more_memory_mode
- -----------------
-
- No problem. I used to have a similar problem with preloading
- workstations with DEC's PCSA (now PATHWORKS) and this method worked
- just ducky. I used to have another nested check to verify that
- there was a network connection to the card as well, so that even
- if the hardware was installed, if there wasn't a real connection
- the machine wouldn't spend time trying to mount resources that
- weren't available. (not an inconsequential amount of time, I might
- add)
-
- I hope this helps.
-
-
- ______Opinions stated are my own. Transcripts available by request______
- ===
- =--==== AT&T Canada Inc. John Benfield
- =----==== 3650 Victoria Park Ave. Network Support Analyst (MIS)
- =----==== Suite 700
- ==--===== Willowdale, Ontario attmail : ~jbenfield
- ======= M2H-3P7 uucp : uunet.ca!attcan!john
- === (416) 756-5221 internet : john@attcan.att.ca
-
- ____Eagles may soar, but weasels don't get sucked into jet engines._____
-
-