home *** CD-ROM | disk | FTP | other *** search
- ------------------------------------------------------------------------
-
- Sysgen V1.32 - Roger Link 12/11/89
-
- ------------------------------------------------------------------------
-
- The Link sysgen program is a utility to help configure and maintain
- MS-DOS configurations files. Through the use of a sysgen configuration
- file, the program can generate files such as AUTOEXEC.BAT and
- CONFIG.SYS for different system needs. This can be very useful if you
- are constantly tampering with your autoexec.bat and config.sys because
- one program wants this or that, and "this or that" interferes with
- everything else in the system. Some programs want extended memory,
- others want expanded. Some things (like LAN programs) have large
- device drivers, or some device drivers refuse to coexist with another.
- With this program, you can change system configuration files by simply
- issuing a command (with a value indicating the number of the system
- desired), and rebooting the computer. Sysgen also has a simple menu
- system to prompt the user for the sysgen value to determine which
- system to build. Sysgen allows for up to nine different systems to be
- stored in a single configuration file (Multiple configuration files are
- allowed.). A utility is included to read your current autoexec.bat and
- config.sys into a configuration file ready for sysgen.
-
- The sysgen configuration file is a line oriented file, read from left
- to right. The primary use of each line is determined by the first
- character in the line. The two most important "commands" are the "F"
- and the "-". The "F" file command determines where the following data
- lines will be output. The "-" indicates a data line. The nine
- characters following either of these commands determine which of the
- nine system(s) will use that line. For example:
-
- -12 8 Path C:\;C:\system;
-
- This "-" data line would only be used with a sysgen value of 1,2 & 8.
-
- Another example shows how the path can be changed for each system:
-
- -1 Path C:\sys\dos;C:\Fred;
- - 2 Path C:\sys\dos;C:\Andy;
- - 3 Path C:\sys\dos;C:\Allen;
-
- The actual characters used in columns 2-10 aren't important, just
- their position. In the above example the "1", "2", "3" would have
- worked just as well if they had been "X"'s. The sysgen program checks
- each position for a space/no space test. I use numbers since they are
- equal to the sysgen value.
-
- A more complete sysgen configuration file follows:
-
- F123456789C:\autoexec.bat
- -1 Path C:\sys\dos;C:\Fred;
- - 2 Path C:\sys\dos;C:\Andy;
- - 3 Path C:\sys\dos;C:\Allen;
- -123 Chkdsk /f
- - 2 cd \Kermit
- - 2 Kermit
- F123456789C:\config.sys
- -12 device = C:\sys\dos\ansi.sys
- - 3 device = C:\sys\public\sansi.sys
- -123456789files=20
- -123456789buffers=20
-
- This example shows the use of the "F" file command. The "F" command
- names the output file to put the following data lines in. For example
- if sysgen was run with the above configuration file, the following
- output files (autoexec.bat & config.sys) would be produced depending on
- the sysgen value input to the sysgen program.
-
- Sysgen Value = 1
-
- C:\autoexec.bat would contain
- Path C:\sys\dos;C:\Fred;
- Chkdsk /f
-
- C:\config.sys would contain
- device = C:\sys\dos\ansi.sys
- files=20
- buffers=20
-
-
- Sysgen Value = 2
-
- C:\autoexec.bat would contain
- Path C:\sys\dos;C:\Andy;
- Chkdsk /f
- cd \Kermit
- Kermit
-
- C:\config.sys would contain
- device = C:\sys\dos\ansi.sys
- files=20
- buffers=20
-
- Sysgen Value = 3
-
- C:\autoexec.bat would contain
- Path C:\sys\dos;C:\Allen;
- Chkdsk /f
-
- C:\config.sys would contain
- device = C:\sys\dos\sansi.sys
- files=20
- buffers=20
-
- The "E" echo primary command will conditionally echo the data portion
- of the line to the user while sysgen is interpreting the configuration
- file. Columns 2-9 determine which sysgen value(s) will trigger this
- line to be echoed as sysgen builds the output files:
-
- E1 ** Disk Cache System Sysgen **
- E 2 ** Turbo Debug Sysgen **
- E 3 ** EasyNet System Sysgen **
-
-
- The "." primary command is a meta command, with column 2 determining the
- function of the line. There are two (oh boy!!) functions. A ";" is a
- comment line with no sysgen action, and a "E" is a unconditional echo
- to the user.
-
- .;********************************************************
- .;*
- .;* SYSTEM.CFG for Gem 20mhz '386
- .;*
- .;* RAL - 12/08/89
- .;*
- .;********************************************************
- .E SYSTEM.CFG - RAL - 12/08/89
- .;23456789
-
- When the above is interpreted by sysgen, the only visible response will
- be a echo to the user of the "SYSTEM.CFG - RAL - 12/08/89" message.
-
- Here is a quick command summary:
-
- F1 C:\autoexec.bat - "F" File select line
-
- -1 Path c:\ - "-" Data line
-
- V1 ** Variable line ** - "V" Variable line
-
- E1 ++ Conditional Echo ++ - "E" Conditional echo
-
- .;* This is a comment line - ".;" Comment line
-
- .E $$ Unconditional Echo $ - ".E" Unconditional echo
-
-
- ------------------------------------------------------------------------
-
- The sysgen command has the following syntax:
-
- SYSGEN [-Ffilename.type] [-Q] [-?] [?] [#]
-
- - Square brackets "[ ]" indicate an option
- - filename.type is the configuration file to use
- - # is the sysgen value in the range 0-9
- - ALL OPTIONS MUST have spaces proceeding and preceding that option
-
-
- A "sysgen" with no parameters will enter "query" mode, and ask the user
- for a sysgen value. Sysgen will search the sysgen.cfg (When used with
- no parameters, sysgen will default to sysgen.cfg.) configuration file
- for all "V" variable lines to make up a menu for the user. Columns
- 2-10 indicate what sysgen value(s) this "V" line is intended for, and
- what menu select number(s) to show with the line. When the user
- replies to the prompt, he can only enter sysgen values that a "V"
- variable has selected as available. Sysgen will automatically add a
- menu line for the "0"/"No system" sysgen value (and allow a zero input
- to select it!!). Here is a example configuration file, and the menus
- that will be produced:
-
- SYSGEN.CFG file:
- V1 ** Fred's System **
- V 2 ** Andy's System **
- V 3 ** Allen's System **
- V 4 --- Autocad System ---
-
-
- Sysgen menu produced:
- 0 ** NO autoexec.bat / NO config.sys
- 1 ** Fred's System **
- 2 ** Andy's System **
- 3 ** Allen's System **
- 4 --- Autocad System ---
-
- Enter number of system desired ->
-
-
- No error checking is done on the variable "V" lines. It is
- possible to have more than one sysgen value per "V" line as:
-
- SYSGEN.CFG file:
- V12 ** Multiple V's per line **
-
- Sysgen menu produced:
- 0 ** NO autoexec.bat / NO config.sys
- 1 2 ** Multiple V's per line **
-
- Enter number of system desired ->
-
-
- It is also permissible to have a variable "V" line with no sysgen
- value. This will output as a "comment" line in the menu area. If a
- sysgen configuration file other than the default sysgen.cfg is desired
- in the query mode, use the -Ffilename.type option. Replace
- filename.type with the desired config file. There is NO SPACE between
- -F and the first letter of the file name!!! If no sysgen values
- (values 0-9) are found on the command line, sysgen will enter query
- mode. If you want to force query mode, add a "-Q" on the sysgen
- command line.
-
- For a single page sysgen help screen use either the "-?" or "?" on the
- command line.
-
- sysgen ? or sysgen -?
-
- If a sysgen value is found on the command line, sysgen will use that as
- the sysgen value. A sysgen value equal to 0, indicates NO SYSTEM,
- which means \AUTOEXEC.BAT and \CONFIG.SYS will be ** ERASED ** after
- user approval. No other files will be modified/erased. If the sysgen
- value is in the range 1-9, sysgen will read and interpret the selected
- config file. No error checking is done to guarantee that this sysgen
- value matches ANY lines in the configuration file.
-
- Options can be entered and combined in any order that the user desires.
- The help command options have precedence over all other options, with
- the query option following. The options are scanned from left to right
- (with validity checking for each). Options that are repeated on the
- command line will take the value/action of the last scanned option.
- Here are a few examples:
-
- sysgen -fconfig5.cfg -q -? ---> Enter help mode
- sysgen 1 -q ---> Enter query mode
- sysgen -fconfig5.cfg 1 2 3 4 ---> Use config file "config5.cfg"
- with a sysgen value of 4.
-
- ------------------------------------------------------------------------
-
- MakeCFG has been included to help you to create a configuration file
- for your system. MakeCFG has the following syntax:
-
- MAKECFG filename.type
-
- Filename.type is the output file that MakeCFG will create. Since
- sysgen defaults to the file "sysgen.cfg", this command would be:
-
- MAKECFG sysgen.cfg
-
- This file will be the merged contents of the current drives
- \autoexec.bat and \config.sys with appended sysgen command information
- on each line. After these two files have been merged, the program will
- query the user to see if any more files are to merged into the output
- configuration file. After running MakeCFG edit the configuration file
- with your favorite text editor, and modify the file as needed.
-
- ------------------------------------------------------------------------
-
- Sysgen and MakeCFG where both written in Turbo Pascal 5.5. The
- programs should compile under Turbo Pascal 4.0 with no problems, and,
- if need be, under 3.0 with some work. (Of course neither of these has
- been tested!!) The programs don't use any clever algorithms or fancy
- code. They are written in a straight forward fashion. There are
- probably a few minor bugs that I haven't spotted!
-
- This program and source code are placed in the public domain. Use it
- as you see fit. There are no guarantees that it will do anything good
- for you (but it sure works for me!!!) Please don't claim that you
- wrote it, or attempt to make a fortune (ha! ha!) off of it. I should
- mention that this program is not a original idea of mine. I saw a
- similar program written by a friend/fellow hacker, Phil Benchoff. But
- of course I didn't really like the way his worked, so I wasted plenty
- of time, and wrote my own!! Thanx Phil!!!! Any bugs/problems
- /suggestions can be sent to me using any of the following addresses:
-
- BitNet address:
- LinkR@VTVM1
-
- Mad Bit Twiddler (MBT) Bulletin board in Blacksburg, Va.: (703-552-8767)
- LinkR
-
- US Mail:
- Roger Link
- RT 2 Box 409
- Newport Va., 24128
-
-
- Here is a copy of my sysgen.cfg for my home system:
-
- .;********************************************************
- .;*
- .;* SYSTEM.CFG for Gem 20mhz '386
- .;*
- .;* RAL - 12/08/89
- .;*
- .;********************************************************
- .E SYSTEM.CFG - RAL - 12/08/89
- .;23456789
- E1 ** Disk Cache System Sysgen **
- E 2 ** Turbo Debug Sysgen **
- E 3 ** EasyNet System Sysgen **
- E 4 ** Small System Sysgen **
- V1 ** Disk Cache System Sysgen **
- V 2 ** Turbo Debug Sysgen **
- V 3 ** EasyNet System Sysgen **
- V 4 ** Small System Sysgen **
- F123456789C:\autoexec.bat
- -123456789@echo off
- -123456789rem ********************************************
- -123456789rem * DO NOT EDIT THIS FILE. IT IS GENERATED
- -123456789rem * BY MACHINE. SEE \SYS\SYSGEN\SYSGEN.CFG
- -123456789rem * RAL 12/08/89
- -123456789rem ********************************************
- -123456789Prompt $e[36m$P$e[32m$G
- -123456789echo off
- -1234 c:\sys\public\vpt /L
- -1 c:\sys\dell\cache.sys /a+ /s:640 /-a /-b
- -1234 path c:\sys\dos;c:\sys\public;c:\kermit;c:\kedit;c:\ws4;c:\lang\pal\cupl;c:\lang\tasm;c\lang\td;
- -1234 \Sys\Public\ced -F\sys\public\ced.cfg
- -1234 \Sys\dos\Chkdsk c:/f
- -1234 \Sys\dos\Chkdsk d:/f
- -1234 \Sys\dos\Chkdsk e:/f
- -1234 \sys\norton\ncc /fastkey
- -1 c:\sys\qemm\qemm
- - 3 cd \easynet
- - 3 netstart /r
- - 3 cd \
- -1234 c:\sys\norton\tm start /C4/L/N
- -123456789mode com2:9600,n,8,1
- -1 ECHO ** Disk Cache System Ready **
- - 2 ECHO ** Turbo Debug System **
- - 3 ECHO ** EasyNet System Ready **
- - 4 ECHO ** Small System Ready **
- .;*
- .;*
- .;* CONFIG.SYS stuff
- .;*
- .;*
- .;23456789
- F123456789c:\config.sys
- -1234 SHELL=C:\COMMAND.COM /P
- -1234 device=c:\Sys\sys\nnansi.sys
- -1234 DEVICE=C:\Sys\sys\LTMOUSE.SYS 1
- -1 device=c:\sys\qemm\qemm.sys
- - 2 device=c:\lang\td\tdh386.sys
- - 3 device=c:\easynet\netdrive.sys
- -1234 BUFFERS=20
- -1234 FILES=20
- -1234 BREAK=ON
- .;*
- .;*
- .;* CED stuff
- .;*
- .;*
- .;23456789
- F123456789C:\sys\public\ced.cfg
- -123456789rem ********************************************
- -123456789rem * DO NOT EDIT THIS FILE. IT IS GENERATED
- -123456789rem * BY MACHINE. SEE \SYS\SYSGEN\SYSGEN.CFG
- -123456789rem * RAL 12/08/89
- -123456789rem ********************************************
- -123456789chainch &
- -123456789syn turbo3 c:\lang\pascal\tp3\turbo
- -123456789syn turbo c:\lang\pascal\\tp55\turbo
- -123456789syn make c:\lang\ndmake\make %1 %2 %3 %4
- -123456789syn eprom1 c:\etc\eprom\eprom1
- -123456789syn hexbin c:\etc\eprom\hexbin
- -123456789syn kedit c:\kedit\kedit
- -123456789syn x c:\kedit\kedit
- -123456789pcall kedit