home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / misc / 6230 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  2.7 KB

  1. Xref: sparky comp.os.msdos.misc:6230 comp.sys.ibm.pc.misc:14846
  2. Path: sparky!uunet!utcsri!utgpu!attcan!john
  3. From: john@attcan.UUCP (John Benfield)
  4. Newsgroups: comp.os.msdos.misc,comp.sys.ibm.pc.misc
  5. Subject: Re: Detecting network cards
  6. Message-ID: <19259@vpk1.UUCP>
  7. Date: 20 Nov 92 14:44:16 GMT
  8. References: <1992Nov17.100750.8778@iscsvax.uni.edu>
  9. Organization: AT&T Canada - MIS Network Development
  10. Lines: 64
  11.  
  12. In article <1992Nov17.100750.8778@iscsvax.uni.edu>, kraai4712@iscsvax.uni.edu writes:
  13. > I'm working with a number of PCs (mostly PS/2s) and need a way to detect
  14. > network cards.  What I'd like to do is have the autoexec.bat log the user in
  15. > (Novell Netware) if they are connected, and not even try if they're not. 
  16. > Checking for specific software on the local PC is not an option.
  17. > This would be nice, as I install the Novell software up to a month before the
  18. > hardware end of our unit gets around to installing the cards and bringing the
  19. > network connection up.
  20.  
  21. That's an easy one. Just trap the return code from your first loaded
  22. driver and check to see if it successfully loaded. If not, jump past
  23. loading any other drivers. For example:
  24.  
  25. -----------------------------
  26.  ECHO off
  27.  cls
  28.  
  29. REM Load the first driver...
  30.  loadme /first /gag_on_err
  31.  
  32. REM check to see if the driver reported an error (you may
  33. REM have to check your manual if the driver uses non-standard
  34. REM return codes.
  35.  if ERRORLEVEL 5 GOTO no_network_card
  36.  
  37. REM if no error, just load the rest of the drivers
  38.  ldthis2
  39.  loadmore
  40.  andmore
  41.  stillmor
  42.  
  43.  
  44. REM skip past the extra drivers if there was a problem.
  45. :no_network_card
  46.  load /post_network_stuff
  47.  mouse /no_squeak
  48.  mode com9:153600,n,8,1,p,eieio
  49.  win /eat_more_memory_mode
  50. -----------------
  51.  
  52. No problem. I used to have a similar problem with preloading
  53. workstations with DEC's PCSA (now PATHWORKS) and this method worked
  54. just ducky. I used to have another nested check to verify that
  55. there was a network connection to the card as well, so that even
  56. if the hardware was installed, if there wasn't a real connection
  57. the machine wouldn't spend time trying to mount resources that
  58. weren't available. (not an inconsequential amount of time, I might 
  59. add)
  60.  
  61. I hope this helps.
  62.  
  63.  
  64. ______Opinions stated are my own. Transcripts available by request______
  65.       ===
  66.     =--====  AT&T Canada Inc.          John Benfield
  67.    =----==== 3650 Victoria Park Ave.   Network Support Analyst (MIS)
  68.    =----==== Suite 700          
  69.    ==--===== Willowdale, Ontario       attmail   : ~jbenfield
  70.     =======  M2H-3P7                   uucp      : uunet.ca!attcan!john
  71.       ===    (416) 756-5221            internet  : john@attcan.att.ca
  72.                                                    
  73. ____Eagles may soar, but weasels don't get sucked into jet engines._____
  74.  
  75.