🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7762

Re: Reconfiguring a network (was Re: Batch Files)

#7762
From: todd j. derr
Date: Tue, 26 Jan 1993 05:03
64 lines
3292 bytes
In article <1993Jan24.135115.10741@gmuvax2.gmu.edu>, skhan@gmuvax2.gmu.edu
(Shahab Raza Khan) writes:
> I have an interesting question.  I want to write a batch file
> which would do the following:
> 
> 1. Down load our backup software from one of our LANs.  The
>    software is not in compressed form but regular files.
> 2. Edit the autoexec.bat file to login to separate accounts on
>    the LAN (e.g. user1, user2 etc)
> 3. edit the config.tel file (for use with telnet) and change the
>    IP number in it (e.g. 129.174.1.1 129.174.1.2 etc)

well, here's what I do for our network of ~85 PC machines here... a
few asumptions that need to hold for this to work:

1) The machines are currently operational, they can connect to the net.
2) You could use a copy of SED, available from your favorite gnuish
ftp site.... I guess you *COULD* contort EDLIN as people have
suggested, but, it's much easier to use sed, especially if you know it.
3) You have some sort of systemwide login script on your LAN, and it
can do this: (which comes from our NETWARE 2.15 login script):
DOS SET NAME=LOGIN_NAME.

  You might be able to program around this if #1 holds.  For example,
our machines are simply named (for Netware's purposes), 1,2,3,...85.
They log into a directory called HOME/1, etc, which you could extract.
All you need is to find some way of identifying the machine, when it
boots, and then work with that...

4) You can get access to the fileserver and all the machines when no
one will be logging in (eg, when our lab is closed)...

Anyways, what I do is this:

Collect all of the software I need installed/upgraded in some known
place, say Z:\TEMP.  You can basically have this anywhere you map a
drive to, and I only put it in one directory for convenience (since
our machines really don't have much besides DOS, config files, and net
drivers on their drives)...

anyways, modify the system login script, so that after it does its
usual stuff, it does:
PCCOMPATIBLE
EXIT "z:\temp\batchfil"

z:\temp\batchfil (or whatever) will do what you need done... I usually
do this through a combination of DEL, COPY, etc...

then, for the grand finale, you'll want to save autoexec.bat and
config.tel... and do: something along the lines of
sed -e s/MY_NAME_HERE/%NAME z:\temp\autoexec > c:\autoexec.bat

and the same for config.tel... you can see how it works...  noone
around here seemed to think of that until I did.... all you have to do
then is reboot all the machines and make sure all went ok.... 

It's nice to reconfigure 85 machines in 5 minutes instead of hours.

todd.


-- 
todd j. derr (infidel+@pitt.edu) \  +1 (412) 363-9027 (h) \ 624-7140 (w)  
university of pittsburgh cis      \ moderator, comp.os.ms-windows.announce 
Technical Details
Message-ID: <2522@blue.cis.pitt.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!asuvax!ukma!cs.widener.edu!dsinc!pitt.edu!infidel
References: <1993Jan24.135115.10741@gmuvax2.gmu.edu> <1993Jan25.134613.1@csc.canterbury.ac.nz> <1993Jan25.152249.8789@udel.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!asuvax!ukma!cs.widener.edu!dsinc!pitt.edu!infidel
From: infidel+@pitt.edu (todd j. derr)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Reconfiguring a network (was Re: Batch Files)
Message-ID: <2522@blue.cis.pitt.edu>
Date: 26 Jan 93 05:03:14 GMT
References: <1993Jan24.135115.10741@gmuvax2.gmu.edu> <1993Jan25.134613.1@csc.canterbury.ac.nz> <1993Jan25.152249.8789@udel.edu>
Sender: news+@pitt.edu
Organization: university of pittsburgh cis
Lines: 64