As a system supervisor, one of the areas I am responsible for, has 7 PC's used for wordprocessing, graphics and pageakeup. Normally it would be a simple task to have each machine set up exactly the same with identical directory structures etc. Unfortunately, computing may have meant to be that simple but it seldom is. As our company has slowly but steadily grown, so too has our "fleet" of PC's - and as a result of trying to purchase the best value/performance units available at the time, we now have an interesting range of machines ranging from the most humble and aging XT (640kB, 4MHz, 360kB floppy) to powerful 37MHz units with 4MB ram and 300MB discs. No two machines are exactly the same, which makes keeping track of each unit's proper configuration a minor nightmare. However, with the help of the DOS command SET I now have a menu and file
structure that is identical on each machine yet allows each to run different software or different
configurations. DOS maintains a small area in RAM called the Environment. The SET command can be used to store information in this area that can be used later by programs or batch files. Using SET commands in batch files can be useful for those running anything from 2 to 20 or so machines and works basically like this: All machines have a minimum standard directory structure of say:
Each machine then has its own unique name (eg in the example that follows, 7 machines called m1, m2, m3 etc - or Fred, Mabel and Nelly if you choose!). Each has its own unique CONFIG.SYS file. (Note - throughout this article the actual .start of a batch file is indicated by its name in bold. Any comments about a line follow straight after the line, or group of lines, in italic and in brackets and ire of course not part of the file itself. DOS commands are in capitals.) All machines use an AUTOEXEC.BAT file that is identical with the exception
of one line which is used to SET the "machine" name. eg?
(Turns off the screen display so that only the required items are actually displayed on the .screen. Some early versions of DOS do not accept the @ so just use ECHO OFF)
(Here we have one line for each machine, however all but the line
referring to this particular machine have been disabled by the use of the : in front of the line. In this
case we want to call this machine "m3" . Note that the word "machine" is not important - you could use
"unit", "PC" etc and you could also use any names other that: ml, m2, etc. The last line runs the Start.Bat
file)
(Most of our machines use the Microsoft MOUSE.SYS in the CONFIG.SYS file but machines m1 & m4 use a "Quick Mouse" confgured as a Microsoft mouse on com port 2 while machine m3 uses the Quick Mouse as a Mouse Systems mouse on com port 1. Having set the "machine" name in the AUTOEXEC.BAT file this START.BAT file looks to see if "machine" equals "m1 " and if it does then carries out the instruction, if not it checks the next line for "machine" equals "m3", etc.)
(The 3 machines m1, m2 & m7 are the only ones that use Windows and their PATH command is amended accordingly. eg machine m7 path is changed from "c:\dos; c:\menu; c:\utility", set at the start of the file, to "c:\dos; c:\menu; c:\utility; c:\win386.")
(This line is ignored unless running on the machine called ml where it runs the LOADFONT.BAT file which downloads fonts to the laser printer)
(Because the two machines m5 and m6 are NOT connected to the printer the GOTO ,statement takes them to the end of the file and avoids the next lines.)
(The first line starts the LTORQ print spooler program for all machines except m5 & m, and the second rins the MENU.BAT file.)
(This line prints "Machine m3", "Machine m4" etc at the top of the screen depending on what the value of "machine" is SET at.)
(This line displays your menu "screen display" on the screen and as this is the end of the menu.bat file, the DOS prompt will then be displayed ready for the next DOS command of batch file name. The MENU.TXT file can be a simple ASCII file of perhaps just 3 or 4 lines, eg
or it could be a complex colour ANSI file. For each menu choice you would
either need to make a batch file of the corresponding letter, in this case V.BAT, W.BAT and C.BAT, or combine
them into one with the use of some utility that will allow you to make a choice such as ASK, BE, YORN, INPUT
etc.)
(These two lines replaces the last used configuration parameters for Ventura and Ventura Professional Extension with our default setup.)
(Each line here is checked with the "machine" name stored with the SET command and if it matches then invokes the Ventura "drvrmrgr" program with the correct parameters such as screen driver, mouse and disk drives available, and then returns to the menu.bat file when the Ventura program finishes.)
(If the machine IS m7 then the batch file jumps to the "startscan" label.)
(Because m7 is the only machine with the scanner, all other ma-chines will display this "not available" message then return to the menu.)
(These lines change to the correct disc and directory and run the scan program on the m7 machine, and then returns to the menu, and is the end of the S.BAT file.)
(As we use both Wordstar and Microsoft Word, these lines direct each machine to the required program label)
(Each of the above options changes to the correct disc and directory for the work files, runs the correct program, and then goes to the "end" label where the batch file returns to the menu.bat file.)
While your particular machines will, of course, use different programs,
configurations and directories, this system allows you to use menu and configuration files that are identical
on all machines. This means that less backups and easier damage control should the vital files on one machine
be destroyed or damaged. |