NOVELL TECHNICAL INFORMATION DOCUMENT DOCUMENT PROCESSING INFO: THIS DOCUMENT REPLACES FYI.M.1105 TITLE: SAMPLES OF POSSIBLE DR DOS CONFIGURATION FILE DOCUMENT ID: TID800027 DOCUMENT REVISION: A DATE: 16AUG94 AUTHOR: ACKEELE;KBANTA ALERT STATUS: Yellow DISTRIBUTION: Public INFORMATION TYPE: Symptom Solution README FOR: NA NOVELL PRODUCT CLASS: Desktop Products NOVELL PRODUCT and VERSION: DR DOS 6.0 CATEGORY: Startup Files ABSTRACT: NA ----------------------------------------------------------------- DISCLAIMER THE ORIGIN OF THIS INFORMATION MAY BE INTERNAL OR EXTERNAL TO NOVELL. NOVELL MAKES EVERY EFFORT WITHIN ITS MEANS TO VERIFY THIS INFORMATION. HOWEVER, THE INFORMATION PROVIDED IN THIS DOCUMENT IS FOR YOUR INFORMATION ONLY. NOVELL MAKES NO EXPLICIT OR IMPLIED CLAIMS TO THE VALIDITY OF THIS INFORMATION. ----------------------------------------------------------------- SYMPTOM SAMPLES OF POSSIBLE DR DOS CONFIGURATION FILES ISSUE/PROBLEM DR DOS has greatly enhanced CONFIG and BATCH commands. This document provides examples of how these various commands can be used. SOLUTION Only the basic ideas are outlined in each example. The rest of the file can be filled in with your own ideas. EXAMPLE 1 - The use of GOTO in the CONFIG file. ?"Do you want to run QEMM (y/n)? " goto QEMM ?"Do you want to run MemoryMAX (y/n)? " goto DRDOS :QEMM DEVICE=c:\QTR_DECK\QEMM386.SYS DEVICE=C:\DRDOS\HIDOS.SYS /B=FFFF (additional QEMM driver lines go here...) goto COMMON :DRDOS hidos=on DEVICE=C:\DRDOS\EMM386.SYS /F=AUTO... ... :COMMON files=40 hibuffers=20 ... The GOTO statement is used to proceed directly to a label. This function works like the GOTO statement found in batch file processing. EXAMPLE 2 - The use of CHAIN in the CONFIG file. This example shows that you can link to other files that hold your configurations for each system setup. In the following CONFIG.SYS file, the two lines direct the configuration process to the files: QCONFIG and MCONFIG.SYS. The appropriate FILES, BUFFERS, etc. information is contained within those files and not within the main CONFIG.SYS file. If the response to both questions is no, a default configuration begins. The RETURN command cannot be used to return to the parent CONFIG file. ?"Do you want to run QEMM (y/n)? " chain=QCONFIG.SYS ?"Do you want to run MemoryMAX (y/n)? " chain=MCONFIG.SYS files=40 hibuffers=20 ... EXAMPLE 3 - Using SWITCH/RETURN and labels. Processing pauses on the SWITCH command until an option is chosen. The appropriate option is selected by choosing a number. The SWITCH command then goes to the corresponding label. In the example below 1 selects the label :NOLIM, 2 selects the label :512K and so forth. The RETURN command will return processing to the line after SWITCH. Notice the use of the ECHO statement for setting up the menu options. ECHO = Choose how much Extended Memory you want to convert ECHO = to LIM Memory for this session. ECHO = ECHO = 1 (or ENTER) No LIM Memory ECHO = 2 512K of Memory ECHO = 3 1024K of Memory ECHO = 4 2048K of Memory ECHO = ECHO = Make your selection... SWITCH NOLIM, 512K, 1024K, 2048K GOTO DEFAULTS :NOLIM DEVICE=C:\DRDOS\EMM386.SYS /F=NONE /K=AUTO /B=FFFF /R=AUTO RETURN :512K DEVICE=C:\DRDOS\EMM386.SYS /F=AUTO /K=512 /B=FFFF /R=AUTO RETURN :1024K DEVICE=C:\DRDOS\EMM386.SYS /F=AUTO /K=1024 /B=FFFF /R=AUTO RETURN :2048K DEVICE=C:\DRDOS\EMM386.SYS /F=AUTO /K=2048 /B=FFFF /R=AUTO RETURN :DEFAULTS SHELL=C:\COMMAND.COM \C: /P /E:512 HIDOS=ON HIBUFFERS=20 FILES=30 etc... EXAMPLE 4 - How to use environment variables in the CONFIG The use of variables in the CONFIG is not quite the same as in batch files. Because the command processor (COMMAND.COM) is not loaded until after CONFIG processing, environment variables are only stored. These variables are then passed to the command processor where they can be tested and processed through the AUTOEXEC.BAT or other batch files. It is not possible to test an environment variable in the CONFIG. The CLS, CPOS, EXIT and SET commands are featured in this example. :DEFAULTS SHELL=C:\COMMAND.COM \C: /P /E:512 HIDOS=ON HIBUFFERS=20 FILES=30 etc.... ECHO = Choose which TSRs and Utilities you want loaded ECHO = at BOOT time for this session. ECHO = ECHO = 1 (or ENTER) None... just continue ECHO = 2 Mouse & Cursor Drivers ECHO = 3 Keyboard "Speeder" ECHO = 4 Novell Network ECHO = 5 Done with selections ECHO = ECHO = Make your selection... :MORE CPOS 10,33 SWITCH NOTHING, CURSMOUS, SPEEDKEY, NOVELL, DONE GOTO MORE :DONE :NOTHING CLS EXIT :CURSMOUS SET THINGS=ON RETURN :SPEEDKEY SET SPEEDKEY=ON RETURN :NOVELL SET NETWORK=ON RETURN The AUTOEXEC.BAT shown below picks up the environment variables. The AUTOEXEC.BAT file now allows testing of the environment variables and executes commands based upon the conditionals illustrated below: @ECHO OFF :drdosbeg VERIFY OFF PATH C:\;C:\DRDOS;C:\BATS;C:\TOOLS;C:\WINDOWS if "%things%"=="on" prompt $e[s$e[0;70H$e[1;36m$t$e[u$e[1;36mDR DOS6$p$g$e[2;32m if not "%things%"=="on" PROMPT [DR DOS] $P$G SET TEMP=C:\TEMP IF NOT "%TEMP%"=="" MD %TEMP% >NUL if "%things%"=="on" HILOAD MOUSE if "%things%"=="on" HILOAD CURSOR /s10 if "%speedkey%"=="on" c:\drdos\mode con:rate=30 delay=1 if "%network%"=="on" hiload c:\lan\ipx if "%network%"=="on" hiload c:\lan\net3 :drdosend OTHER EXAMPLES 1) Selecting different configuration options from the CONFIG.SYS file using the ? key. ?SHELL=C:\COMMAND.COM C:\ /P /E:512 ?SHELL=C:\COMMAND.COM C:\ /P /E:1024 ?BREAK=OFF ?BREAK=ON BUFFERS=20 FILES=20 ?HISTORY=ON, 256, ON, OFF, OFF ?DEVICE=C:\DRDOS\ANSI.SYS 2) Selecting different AUTOEXEC.BAT's from CONFIG.SYS using the ? and the Shell statement. In the Shell statement the /P switch can be followed by a filename. When present, the named file will be executed instead of the AUTOEXEC.BAT. The named file must have a .BAT extension and cannot exceed 11 characters including path. ?"Default Autoexec? (y/n) "SHELL=C:\COMMAND.COM C:\ /P /E:256 ?"Alternate Autoexec? (y/n) "SHELL=C:\COMMAND.COM C:\ /P:ALTERNAT.BAT /E:256 3) Selecting and using different configuration files from CONFIG.SYS at bootup. ?"Do you want to run Windows? (y/n) " chain = WCONFIG.SYS ?"Do you want to use QEMM? (y/n) " chain = QCONFIG.SYS ?"Do you want to use MemoryMAX? (y/n) " chain = MCONFIG.SYS ?"Do you want to use 386MAX? (y/n) " chain = 386CONF.SYS Each line is printed on the screen and you are asked to load/run the chained configuration file. Each configuration file is a complete CONFIG.SYS type file with all of the appropriate options. 4) The above configuration using "menu" choices with SWITCH. Note how the "SET environment" variables can be used and tested for different AUTOEXEC type files in this example. CONFIG.SYS ECHO = 1 For Windows Configuration ECHO = 2 For QEMM Configuration ECHO = 3 For DR DOS MemoryMAX Configuration ECHO = 4 For 386MAX Configuration ECHO = 5 For no Configuration... just exit SWITCH win, qemm, memm, 386m, none :none set autoexec=norm exit :win set autoexec=win chain=wconfig.sys :qemm set autoexec=qemm chain=qconfig.sys :memm set autoexec=memm chain=mconfig.sys :386m set autoexec=386m chain=386conf.sys AUTOEXEC.BAT @echo off PATH C:\DRDOS;C:\;C:\UTIL; VERIFY OFF PROMPT $P$G DISKMAP C: D: IF "%autoexec%"=="norm" goto DRDOSEXIT SHARE /L:40 IF "%autoexec%"=="win" SUPERPCK /EM /L:2048 IF "%autoexec%"=="qemm" CALL QEMM.BAT IF "%autoexec%"=="memm" SUPERPCK /A /L:2048 IF "%autoexec%"=="386m" CALL 386.BAT :DRDOSEXIT 5) Using ANSI ANSI escape sequences can be used in batch file processing to create colorful menus. Below is an example of a menu that uses the SWITCH command and ANSI escape sequences to create a menu. ANSI.SYS must be loaded in the CONFIG.SYS to allow for cursor positioning and colors. The first character after the Echo statement is an ASCII 27 or escape character. This character may be displayed differently on some printers and monitors (in fact if you have ANSI loaded you will never see the character when typed to the screen). To type this character using the DR DOS Editor type CTRL-P then the ESC key. An alternate method is to type CTRL_Q N and then type the number 27. Within Editor the ESC character will appear as: ^[ . If you have downloaded this document from CompuServe or the Novell Host System the escape sequences have been left intact and you can use the DR DOS Editor to block out the Echo statements to a file. Then, if ANSI is loaded when the file is typed to the screen you should see white letters on a magenta background. For additional information on ANSI.SYS and escape sequences refer to page 399 of the DR DOS Users Guide. @ECHO OFF ECHO +---------------------------------+ ECHO ¦ 1. CONTINUE W/O SCAN ¦_ ECHO ¦ 2. SCAN FOR VIRUSES ¦_ ECHO +---------------------------------+_ ECHO ___________________________________ SWITCH MENUBEGIN,SCAN ----------------------------------------------------------------- Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information. -----------------------------------------------------------------