home *** CD-ROM | disk | FTP | other *** search
- **********************************************************************
- MULTICNF.SYS v2.0
- multi configuration program
- **********************************************************************
- (C) 1990 Tero Pelander.
-
- You can distribute this utility when
- following conditions are met:
- - The program is not modified in any way
- - You ask no contribution from the receiver
- of this program.
-
-
-
- ***** Description *****
- This program enables to use 3 different CONFIG.SYS and AUTOEXEC.BAT
- configurations, which can be selected at boot-time by pressing preset key
- combinations.
-
-
-
- ***** Usage *****
- The MULTICNF.SYS file should be on the first line in the CONFIG.SYS file,
- and must be before the four device=-------- lines.
-
- Usage: device=MULTICNF.SYS xx /T /N /R /Ox
-
- Explanations:
- xx , time in seconds 0 - 60
- - Time that program is waiting for responce from keyboard.
- - If the time is 0 none of the texts are writen on the screen unless one
- of the selection keys is pressed.
- - The default wait time is 10s.
- - This should be the first option.
-
- /T , /Text , text lines follow
- - Tells the program to show additional information of different selections.
- Next lines on config.sys are comments for user to make his/her selection.
- e.g. device = text This is first comment. Everything starting after first
- DEVICE=TEXT (or second) space behind word TEXT will be printed.
- device= TEXT (this line begins with 3 spaces) Next line is empty.
- DEVICE =text
- - Depending on MS-DOS version you should leave one or two spaces behind
- word TEXT before you start your own text.
- - Currently all text will be converted to uppercase (by MS-DOS).
- - If wait time is 0 none of the texts will be printed. You should still
- leave the /T option to suppress any warnings about device=text lines.
-
- /N , /No prompt
- - line 'Press SHIFT, ALT or CTRL.' won't be printed
-
- /R , /Remove comments
- - You may want to include explanations to your config.sys starting with
- REM command. Ms-dos versions before 4.0 don't understand that command
- and will print 'Unrecognized command'.
- - Including this option will suppress all 'Unrecognized command' warnings
- but warnings like 'Unable to find ANSI.SYS driver' are printed. Look at
- /O option.
-
- /Ox , /Old ms-dos version
- - The program automaticly detects what MS-DOS version it is using but
- you can force it to use different settings.
-
- /O0 or /O
- no restrictions, default for 4.0 and better
- /O1
- leave small part of code to memory and no empty line mark,
- default for all before version 3.3
- /O2
- no empty line mark, default for 3.3x versions
-
- When there is no empty line mark
- - Pre 4.0 versions of MS-DOS don't usually count the number of the line
- so they don't have a code for an empty line. When this is true multicnf
- removes all unwanted lines and to fills the end of configuration with
- 'Unrecognized command' mark.
- - You will always get warning 'Unrecognized command' as if the last command
- in the config.sys had been typed wrong. This doesn't depend in any way
- from option /R.
-
-
- Example of the first line in CONFIG.SYS for MS-DOS v3.2:
- DEVICE=C:\MULTICNF.SYS 15 /R
-
- Example of the first line in CONFIG.SYS for MS-DOS v4.0:
- device=c:\multicnf.sys 15
-
-
-
- ***** Selecting the boot configuration *****
- When machine boots up with MULTICNF, it will print it's acknowledgments
- and asks you to press SHIFT, ALT or CTRL. One of these keys can also be
- already depressed when the program executes. If none of the keys are pressed
- in a preset time (the number of seconds in config line), the configuration
- one (same as when SHIFT is pressed) is selected. Therefore, the first
- configuration is considered to be 'the normal one'.
-
-
-
- ***** Creating multiple configurations *****
- All three configurations must be in CONFIG.SYS, separated with text
- 'DEVICE=--------' (8 minuses). The part between the first line (which
- loads MULTICNF) and first separator (device=--------) is always executed.
- The part from the first separator to second is run when normal/SHIFT
- configuration is selected, and so on.
-
- You can include comments to the end of separator line by first putting
- an space behind device=------.
-
- You can write commands after the last separator line but it will bring
- some unwanted properties. The warning 'Unrecognized command' (MS-DOS
- versions 2.11 - 3.x) will be placed where the last separator line is.
- Version 4.x users will get invalid line numbers when an error is detected
- on such line. Usually around 100 - 500 depending how many device=text lines
- there are.
-
- An example of config.sys (without the actual CONFIG commands.)
-
- DEVICE=C:\DOS\DRV\MULTICNF.SYS 15 /T
- <if you use option /T, device=text lines are placed here>
- <commands in here are always executed>
- DEVICE=-------- <comment here>
- <commands in here are executed when nothing or SHIFT is pressed>
- DEVICE=-------- <comment here>
- <commands in here are executed when ALT is pressed>
- DEVICE=-------- <comment here>
- <commands in here are executed when CTRL is pressed>
- DEVICE=-------- <comment here>
-
-
-
- ***** Detecting errors in config.sys *****
- An error will be reported if any line (even within a part that doesn't get
- executed) has a command that MS-DOS doesn't understand and you haven't used
- /R option.
-
- MS-DOS version 4.0 tells always the line number with the error. Lines
- correspond directly to the config.sys file. Too large line numbers will
- result from adding command behind last 'device=--------' line
-
- If you are using /O1 or /O2 option or you are using ms-dos version 3.3 or
- older you will always get an extra 'Unrecognized command' warning in the end
- of config.sys.
-
-
-
- ***** Using multiple AUTOEXEC.BATs *****
- The program doesn't change the AUTOEXEC in any way regardless of the
- key pressed when booting. The way you can use multiple AUTOEXECs when
- booting, is using another program included: MULTIRET.COM. It returns in
- ERRORLEVEL with what key the machine was booted. The following return
- values exist:
-
- 0 - no key was pressed at boot up time. configuration one (1) was used
- 1 - machine was booted with configuration 1. SHIFT was pressed
- 2 - configuration 2. ALT was pressed
- 3 - configuration 3. CTRL was pressed
-
- Next example shows the exact way of doing this. It just echoes the key
- combination the machine was booted with, but of course you can put anything
- you want in the place of the echoes.
-
- @echo off
- rem @ as the first mark on the line turn echo off for one line only
- rem on MS-DOS version 3.3 and later
- multiret
- if errorlevel 3 goto CNF3
- if errorlevel 2 goto CNF2
- if errorlevel 1 goto CNF1
- echo No key was pressed
- :CNF1
- echo Started with config 1, normal
- goto END
- :CNF2
- echo Started with config 2, ALT was pressed
- goto END
- :CNF3
- echo Started with config 3, CTRL was pressed
- :END
-
-
-
- ***** Technical information *****
- After MS-DOS has been loaded CONFIG.SYS file is being decoded to memory.
- When a device (e.g. MULTICNF.SYS) is executed for first time it is given
- a pointer to decoded information of CONFIG.SYS.
-
- This program makes changes to the information and after it has finished it
- tells to MS-DOS that it couldn't install itself properly. MS-DOS releases
- the memory and executes the next command in the modified configuration.
- MS-DOS versions before 3.3 can't properly dechain the device driver so a
- small part (48 bytes) of the program is left in the memory.
-
- There is no way of knowing where the end of the decoded information is so
- user must supply the info by a device=-------- line.
-
- The program has been tested on MS-DOS versions 2.11, 3.2, 3.3 and 4.0.
-
-
-
- ***** Version history *****
- 1.0 First releace by Sami Tammilehto
- 2.0 completely rewritten by a new author
- added all options, wait time is no longer needed on config.sys,
- added support for ms-dos 4.0
- 2.1 fixed a bug: time zero and no key pressed
- dos timer is no longer modified
- commands behind last device=-------- line allowed
-
-
- I hope you have use of this utility. If you find any bugs, are intrested
- in the source code or think of some enchantments contact me.
-
- Internet: tpelander@kontu.utu.fi (130.232.2.1)
- Bitnet: tpelander@FIRIEN
- Post: Tero Pelander
- TOP-keskus
- Torninkatu
- 20100 Turku
- Finland
-