Está en la página 1de 15
6-2MENU. TXT DOS 6.2 CONPIG.SYS Menu's for Dunnies or How to make multiple configurations run on your computer. Several people on CompuServe Tandy and IBM forums have asked how to utilize the DOS 6.2 menu commands in the CONPIG.SYS and AUTOEXEC.BAT files to create multiple configuration selections for the computer. Since MicroSoft in their push to conserve paper put most of the information how to do this in the Help command ‘On-Line’, and not in the ‘hard-copy’ manual, it's hard to create your new CONFIG.SYS and AUTO- EXEC.BAT files and access the ‘Help! at the same time. Of course, you can PRINT out the various help files that refer to the various menu Commands, but an example in front of you, is worth more than the hassle of going between the manual, DOS Help cormand and re-entering your ASCII text editor, to create a working file. I, Definitions of CONPIG.SYS command items for multiple configurations: (A11 taken straight form DOS 6.2 HELP text file.) DOS 6.2's ‘HELP! note states: "A single CONFIG.SYS file can define several different system con- figurations. To define multiple configurations, you use the following special CONFIG.SYS commands: " ‘stenuitem> NOTE: the additional commands and are not included in thie ‘BASIC’ example. Pégina 1 Definitions: 6-2MENU. TXT A. [menu]: header block tells the booting eystem that multiple configurations are included in the CONFIG.SYS file. This is always the first item at the start of the CONFIG,SYS file. B. Menucolor: is a command to create color information for the menu screen. syntax menucolorex',y] where x= color of text, Valid values from 0 to 15 where optional color of background. Valid values from 0 to 15 If not included default color is black background color values: 0 Black 5 Magenta 1 Blue 6 Brown 2Green 7 White 3 cyan 8 Gray 4 Red 9 Bright Blue 20 2 a Bright green 15 Bright white Bright cyan Bright red Bright magenta Yellow NOTE: according to DOS 6.2 values from 8 to 15 on some systems will cause the screen to blink. Always test before making a final color statement. example: menucolor=15,1 (Bright white text on Blue background) C. Menudefault: is a command that specifies to the system the default configuration that the computer uses if no selection is made during startup after a specified time. This command Pagina 2 §-2MENU.TXT can only be used within the meni block of the CONFIG.s¥S file. If it is not included the default is set to menu-iten 2. syntax menudefault=blockname [, timeout] blockname is the name of the default selection to be run. [timeout] is the optional amount of time the system counts down from waiting for a key selection. If the timeout is reached without a valid key selection the default selection is automatically selected. Valid values are from 0 to 90 seconds example: menudefault-Hone, 15 (Home menuitem is selected after 15 seconds countdown delay.) D. Menuitem: defines an item in the startup menu. It is used only within the menu block of the CONFIG.SYS file. Maximim number of Menuitems is 9. Each Menuitem is a choice that appears on screen when the system boots up. Bach is the EXACT title of a choice block that follows the menu block syntax menuitemsblockname [,menu_text] blockname is the EXACT title of the associated configuration block. The configuration block mst be defined elsewhere in the CONFIG.SYS file. If it is selected from the menu, MS-DOS carries out the comands in the block as well as any connands listed in the CONFIG.SYS file before the [menu] block and and commands contained in the [common] header block. NOTE: if MS-DOS cannot find a block with the specified (EXACT) name the name will not Pagina 3 §-2MENU. TXT appear on the startup menu. Maximum length Gf the block name is 70 characters. Excluded characters are (/), (\), (i)y (i), (#) and (C1). mmenu_text specifies the EXACT text MS-DOS will display for this enu item. Tf not specified MS-DOS will display the menu block name as the menu item. Maximum of 70 characters with all printable characters available example: menuitemsHone, Home Ram Drive C: External Drive D: (defines the Hone menu block and what is displayed on the configuration menu screen for this block IT. Procedure for creating CONFIG.SYS Menu file A. Define what configurations you require for your computer. Examples are: 2, Different users, Single option: Do different users of the computer require different configurations? ie: Does Joe require networking and Jane doesn't. Does Jane need only to start Windows, Does Jack only require a statistical program to run. Each of these decisions can create a menuitem option for the menu. 2. Different options, Single user: Do you require the computer to start different programs or does the requirements for various prograns require diferent resources (Memory, Drivers, etc) ie: Portables connected at home to devices or equipment you don't take on the road. Pagina 4 6-2MENU.TXT A Database program that requires different devices that your word processor program doesn't need. ‘That BIG game you play requires more memory than your normal configuration has available. Again, each of these choices creates a menuitem option. 3. Different users, Multiple option: Do your different users require different options at Aitferent times? Although 1 didn't have this problem you can either create menuitens with different titles for the same user. ie: Jane-WP, Jane-DB, Joe-1, Joe-2, for example, or use the Submenu command for nested configurations within a menuitem. I haven't touched on thie command because, I haven't used it. Other ‘experts’ can probably provide the expertise to use this command. B. Determine the resources required for each menuiten. On a separate piece of paper for each menu choice, determine what resources and CONPIG.SYS file commands are needed for each choice you require. After you are satisfied that the required items are listed, place the choices next to each other and compare the items to ‘find common items that the entire menu can use. Any Common items can be placed in to a menuitem labeled Common and deleted from the other menuitem blocks ‘Also decide the title of the menu choice that you want to appear on the Menu screen, Tt should be descriptive enough so you can quickly decide which configuration you want to run. C. Test your configuration blocks. Pagina 5 6-2MENU.TXT once you decide what each configuration should contain, make sure that each will operate by making temporary CONFIG.SYS and AUTORXEC.BAT files to test each choice. This should insure that they operate without problem, before you combine them in large files that can be hard to 'Debug' NOTE: Don't do this to your CONFIG.SYS and AUTOEXEC.BAT files that run you computer now, either save you present files co you can go back to your current configuration, or create a ‘Boot diskette! with all the required resoures and use it to ‘cut and paste’ until you are satisfied. Once you have created your final CONFIG.SYS and AUTOEXEC.BAT files then you can copy them to your normal boot harddrive or diskette HINT: Since it's easy to ‘loose! root files when making changes to your CONFIG.SYS and AUTORKEC.BAT files, the safest thing that T've found to prevent thie is to create a "Backup" directory with copies of the curent CONFIG.SYS and AUTORXEC.BAT files placed in it, along with any other files that you want to Protect. (COMMAND.COM, Batch files, etc.) D. Assembling CONFIG. s¥s Everything checks out? Now comes the ‘hard! part putting the files together so that they work. Place your configuration blocks in the order you want them to appear on the menu screen and then start your ASCIT word processor or DOS's edit program. (Look at figs 1.1 and 1.2 for my examples) Lines 1 thru 9: define the menu screen Line 1: menu block header Line 2 thru 7: define the menu choices and what is printed on Pagina 6 6-2MENU. TXT screen, NOTE: The bock item name mst be the exact spelling of the menu block you want to run. Line 8: menucolor tells the system what colora to use on the Line 9; menudefault what menu choice to use if I don't select a choice within 30 seconds Lines 10, 15, 22,28,33,38: separates the configuration blocks from each other. Lines 11,16,23,29,34,39: Are the configuration block headers. Their spelling mst agree with the choices in the menu header block above. Lines 11 thru 14: Conmon configuration block. what common resources are common to all possible choices for systens configurations Lines 16 thru 21: Sample config block. What I want the Normal ‘configuration to use. Note: the LASTDRIVE-K command is because I use the SUBST conmand to identify certain directories as virtual drives in this configuration. Happy with your CONFIG.SYS file? OK, save it and then verity it's ok by testing on your ‘scratch diskette’, then when you're finally satistied save it, and go on to the AUTOBXEC.BAT file Autoexec.Bat file creation Now the system will boot up to a selected configuration, Pagina 7 §-2MENU.TXT However, you may want to have a certain program start once a configuration is set. You mst write your AUTOEXEC.BAT file to select the proper conmands to run the progam based upon what configuration you selected. Fortunately, the batch command GOTO allows this to be done easily. Using the new environment variable tconfigt, the AUTORKEC.BAT looks into the operating configuration and then selects the correct commands to run. Procedure for creating AUTORX.BAT file. 1. Decide options you want again, look at what commands you need to run, once each of the configurations created in the CONFIG.sYS file is selected . Commands common to all choices. (run these before your menu choices) b. Windows start up ©. Game choice 4. Conme program (Any Telecomminications software program) (CompuServe, TE Works, for example) fe. Files copied to Ram Drive (Some users place frequently used programs on a Ram Drive to speed up access time.) £. Commands needed (set prompt for example) (Set Environment commands are the most obvious) Bach of the above optional choices creates a block in the AUTO- BXEC.BAT file that mst agree in syntax to the environnent variable Smenuitemt created in the CONPIG.SYS choice selection. Pagina 8 6-2MENU.TXT create menu items on paper ‘This sets the sequence you want followed in each choice, NOTE: The title of the choice 'MUST’ match the title of the configuration block in the CONFIG.SYS file that it is used with. (see example) When you copy them to your AUTOBXEC.BAT file, each section must be separated from the others by a blank line ‘Test you selections. Using the same process you used to test your configuration blocks in the CONFIG.SYS file, teat the blocks to insure they operate correctly before assembling the final AUTO- EXEC.BAT file. Assenble your AUTOEXEC.BAT file once you have verified the blocks work and have placed then in the order you want. Use your ASCII word processor or DOS's EDIT to create your AUTOEXEC.BAT file, Remember: a. That the line "goto tconfigt" must be included before the start of the menu choices so the batch file will look into the environment to see which choice to select. b. Bach title mist agree with a configuration block title ie: :Normal, :Home, :Game, :Conms for example. Otherwise it will not run. ©. Hach choice mist be separated by a blank line and must include the command "goto end* as the last line of each section. This allows the batch file to automatically end once all the commands are run by the selected menuitem. Pagina 9 6-2MENU, TXT 4, The last line in the AUTOEKEC.BAT file mst be ":End", or the batch file will not stop automatically. Included examples. Fig 1.1 and 1.2 are CONFIG.SYS and AUTOEXEC.BAT files for a TANDY 1400 dual 3 1/2" floppy drive laptop, with an external 5 1/4" floppy arive Since my Tandy does not allow the CompuServe pgns and an external drive to co-exist due to memory limitations and the fact that the ex- ternal floppy is not present when traveling, or when running certain games, I developed the configurations shown to select the configuration I need at different vimes. Hey, it's an old computer, it works and is paid for, what more do you want? The basic information will work even on a Pentium class multi $ special, as long as you have DOS 6.2 loaded. ‘The only commands that were touched on are the menu items for the CONPIG.SYS file, and certain comands required in the AUTORXEC.BAT file, you should be familiar with all other commands by now. For clarity each line of the CONFIG.sYS and AUTORXEC.BAT is numbered and these numbers should be not be used in actual files. Notes about each Line are separated by "+ +" and should not be included in your files 1. Menu choices made: A. On all selections common items required: load SBTVERS, MOUSE and ANSI drivers Pagina 10 7 6-2MENU. TXT B. Home configuration items: Ram Drive C: load various DOS files into Ram Drive root directory and certain batch and small .EXE and .COM files into a subdirectory on the ram drive external Drive D. defines the external disk drive as drive D: the configuration block will load the device driver and identify the drive as the D: arive C. GAMEL configuratior no ram drive make external floppy drive Cc: D. GaMg2 configuratior no ram drive no external floppy drive 1. coms configuration: no ram drive no external floppy drive ‘maximum memory to run large pgne files such as CompuServe NOTE: This is a slightly different configuration than GAME2. F. Road configuration: ram drive as C: drive load various DOS files into Ram Drive root directory and certain batch Pagina 12 6-2MENU. TXT ‘and small .EXE and .COM files into a subdirectory on the ram drive Fig 1.1 CONFIG.svs menu) tells systems configuration is menu format+ menuitem=Common +nenu selection title and title on screen+ menuitem-Normal, Ram Drive=C, B/P Drive=D Hone menu selection+ menuitem=Ganel, | No Ram Drive, B/P DrivesC Home +menu selection+ menuitem-Game2, No Ram Drive, No B/P Drive Home/Road +menu selection+ menuitem=Conms, Compuserve No B/P drive, No Ran Home/Road smenu selections menuitem-Roadi, Ram DrivesC, No B/P drive Road +menu selection+ menucolor=15,11 +gets color of menu: white text on blue backgrounds menudefault=Normal, 30 +tells system default selection and time delay+ blank Line separator+ [common] menu selection titles stitle mist be same as title abover + device=A:\08\Setver.exe device=A:\D08\Mouse sys + devicenA:\DOS\ansi. sys Normal} menu selection titier device-A: \D0S\Ramdrive. sys 128 sys + buffers=20 Lastdrive: menu selection titles \D08\Backpack. sys * butters=10 lastarive: [came2) 4menu selection title+ Pagina 12 6-2MENU. TXT 30. files-20 31. buffers=10 32. lasedrive 33 34. [Comms] smenu selection title+ 35. files=40 36. butfers=20 37. lastdrivent 38. 39. [Roadi) tmenu selection titler 40. device=n: \D0s\Ramdrive.sys 128 41. files-20 42. bufters-10 43. lastdrivese Fig 1.2 AUTOEKEC.BAT fi14 Wote: the various conmands such as SECRET.COM are peculiar to my files and should not be used if you decide to copy this example Tf you leave them in the batch file you'll get ERROR messages such as: "File not found", "File not copied" or other such ERROR messages if you run the AUTOBXEC.BAT file as written below a: \bin\secret.com + runs pgme without showing title on screens cle pause type a:\backup\gund.txt types text on screen without titles goto tconfigt +tells system to select setion with the same name as+ sthe selected item in the CONFIG.SYS file+ Pagina 13 6-2MENU.TXT 9. + blank separator lines 10. :Normal Normal config selection autoexec conmands+ 31. cd a: \backup 12. eautox batch command to load files to Ram drive C:+ 23) ca\ 14. ec: 15. goto end stells system to skip rest of choices ang end programt 16. 17. :Gamet +Game1 config selection autoexec conmands+ 18. goto end as. 20. :Ganez +Game2 config selection autoexec conmands+ 21. goto end 22. 23. :Coms ‘Comms config selection autoexec conmanda+ 24, prompt=comms$p§G +reminds that the Conms config is selected+ 25. goto end 26 27. :Roadt ‘Road config selection autoexec commands+ 28. cd a:\backup 29. @autox 30. cd\ 31. cr 32. goto end 3 34. send hatch file end comand+ NOTE: To those who would like to use miltiple configurations, and haven't upgraded to MS-DOS 6.x, You can operate by creating several, Giftfernt CONPIG.SYS and AUTORKEC.BAT files with different titles and creating a batch file to copy a selected configuration to the CONFIG,SYS and AUTOEXEC.BAT files that will operate the next time you reboot Pagina 14 For example using the choices above: Norma’ canes: comms fiamdrive & External drive: External drive No Ram Drive, External Drive: Your menu choices are 2. Normal, 2. Games 3. Comms The choices as selected will copy: 1: CONL.txt to CONFIG.SYS, Autol.txt 2: CON2.txt to CONFIG.SYS, Auto2.txt 3: CON3.txt to CONFIG.SYS, Auto3.txt When you ‘reboot! the computer starts selected. 6-2MENU. TXT COMA. txt & AUtoL. txt CON2 ‘txt & Auto? txt CON “exe to. to. & Rutod sexe AUTOEXEC. BAT AUTOEXEC. BAT AUTOEXEC. BAT the configuration you Comments text can be sent to me, Any coments, flak, or suggested improvements to this help I may or may not answer them personally, but will consider them for inclusion in later versions of this file Richad H Brown Pagina 15

También podría gustarte