home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / msdos / programm / 12460 < prev    next >
Encoding:
Internet Message Format  |  1993-01-26  |  3.1 KB

  1. Path: sparky!uunet!gatech!asuvax!ukma!cs.widener.edu!dsinc!pitt.edu!infidel
  2. From: infidel+@pitt.edu (todd j. derr)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: Reconfiguring a network (was Re: Batch Files)
  5. Message-ID: <2522@blue.cis.pitt.edu>
  6. Date: 26 Jan 93 05:03:14 GMT
  7. References: <1993Jan24.135115.10741@gmuvax2.gmu.edu> <1993Jan25.134613.1@csc.canterbury.ac.nz> <1993Jan25.152249.8789@udel.edu>
  8. Sender: news+@pitt.edu
  9. Organization: university of pittsburgh cis
  10. Lines: 64
  11.  
  12. In article <1993Jan24.135115.10741@gmuvax2.gmu.edu>, skhan@gmuvax2.gmu.edu
  13. (Shahab Raza Khan) writes:
  14. > I have an interesting question.  I want to write a batch file
  15. > which would do the following:
  16. > 1. Down load our backup software from one of our LANs.  The
  17. >    software is not in compressed form but regular files.
  18. > 2. Edit the autoexec.bat file to login to separate accounts on
  19. >    the LAN (e.g. user1, user2 etc)
  20. > 3. edit the config.tel file (for use with telnet) and change the
  21. >    IP number in it (e.g. 129.174.1.1 129.174.1.2 etc)
  22.  
  23. well, here's what I do for our network of ~85 PC machines here... a
  24. few asumptions that need to hold for this to work:
  25.  
  26. 1) The machines are currently operational, they can connect to the net.
  27. 2) You could use a copy of SED, available from your favorite gnuish
  28. ftp site.... I guess you *COULD* contort EDLIN as people have
  29. suggested, but, it's much easier to use sed, especially if you know it.
  30. 3) You have some sort of systemwide login script on your LAN, and it
  31. can do this: (which comes from our NETWARE 2.15 login script):
  32. DOS SET NAME=LOGIN_NAME.
  33.  
  34.   You might be able to program around this if #1 holds.  For example,
  35. our machines are simply named (for Netware's purposes), 1,2,3,...85.
  36. They log into a directory called HOME/1, etc, which you could extract.
  37. All you need is to find some way of identifying the machine, when it
  38. boots, and then work with that...
  39.  
  40. 4) You can get access to the fileserver and all the machines when no
  41. one will be logging in (eg, when our lab is closed)...
  42.  
  43. Anyways, what I do is this:
  44.  
  45. Collect all of the software I need installed/upgraded in some known
  46. place, say Z:\TEMP.  You can basically have this anywhere you map a
  47. drive to, and I only put it in one directory for convenience (since
  48. our machines really don't have much besides DOS, config files, and net
  49. drivers on their drives)...
  50.  
  51. anyways, modify the system login script, so that after it does its
  52. usual stuff, it does:
  53. PCCOMPATIBLE
  54. EXIT "z:\temp\batchfil"
  55.  
  56. z:\temp\batchfil (or whatever) will do what you need done... I usually
  57. do this through a combination of DEL, COPY, etc...
  58.  
  59. then, for the grand finale, you'll want to save autoexec.bat and
  60. config.tel... and do: something along the lines of
  61. sed -e s/MY_NAME_HERE/%NAME z:\temp\autoexec > c:\autoexec.bat
  62.  
  63. and the same for config.tel... you can see how it works...  noone
  64. around here seemed to think of that until I did.... all you have to do
  65. then is reboot all the machines and make sure all went ok.... 
  66.  
  67. It's nice to reconfigure 85 machines in 5 minutes instead of hours.
  68.  
  69. todd.
  70.  
  71.  
  72. -- 
  73. todd j. derr (infidel+@pitt.edu) \  +1 (412) 363-9027 (h) \ 624-7140 (w)  
  74. university of pittsburgh cis      \ moderator, comp.os.ms-windows.announce 
  75.