DOS 6's MultiConfig, part 4. (Hardware Clinic) (Column)
by Mark Minasi
This month, I'll conclude my discussion of MultiConfig's features. For the benefit of those just tuning in, MultiConfig is perhaps the best new feature of DOS 6. It lets you combine a number of CONFIG.SYS/AUTOEXEC.BAT pairs into a single CONFIG.SYS and AUTOEXEC.BAT. You can then choose which configuration you wish to boot with from a menu that's displayed at boot time. Check out the June, August, and September "Hardware Clinic" columns for more information.
This month, we'll look at MultiConfig's SUBMENU command, which can be especially helpful when you have more than one person using the same computer.
What's a Submenu?
We're used to working with menu systems under the DOS Shell, Windows programs and OS/2 applications; those menu systems are typically two-level menu systems--select an option, and more suboptions appear.
For example, I'm looking right now at the menu on a Windows program, Ami Pro. The Ami Pro menu offers the options File, Edit, View, Text, Style, Page, Frame, Tools, Window, and Help. That's the top-level menu. However, if I click the mouse on, say, the Window menu item, then I get another menu below that, a kind of submenu that offers the options New window, Tile, and Cascade.
MultiConfig lets you add a second level of menus to your MS-DOS Startup Menu using the SUBMENU command. For instance, recall the Normal-versus-Interlnk example that I've used during the previous months. Interlnk can be used in either server or client mode. You could put together a menu with three options on it: Normal, Interlnk-Server, and Interlnk-Client. Or you could have a top-level menu that offered just Normal and Interlnk options, and then if you chose Interlnk, you'd get a second-level menu that offered either Client or Server. Note that putting a submenu on Interlnk doesn't force you to put a submenu on the other menu options, such as Normal.
The SUBMENU command in MultiConfig looks like this.
Here, MENUBLOCK is the name of a block--a section of CONFIG.SYS with that name at the top enclosed in square brackets. Menutext is the text that you want displayed on the Startup Menu. You then create a block called [MENUBLOCK] that contains menu commands, just like the original block called [MENU].
When we last looked at the Normal/Interlnk example, the CONFIG.SYS looked like this. [MENU] MENUITEM NORMAL,Standard setup MENUITEM INTERLNK,Setup with Interlnk driver MENUDEFAULT NORMAL,2 [SHARED] FILES=60 BUFFERS=30 STACKS=9,256 DEVICE=C:\DOS\HIMEM.SYS DOS=HIGH [NORMAL] INCLUDE SHARED [INTERLNK] INCLUDE SHARED DEVICE=C:\DOS\INTERLNK.EXE To make the Interlnk option not a configuration, but a submenu, I'll change MENUITEM INTERLNK,Setup with INTERLNK driver to SUBMENU [INTERLNK, Setup with Interlnk driver.
Once I do that, however, MultiConfig will expect the [INTERLNK] to contain menu commands, not CONFIG.SYS commands. So the new [INTERLNK] block should contain a menu for the Interlnk server and client commands. That menu will have new menu items, can contain menu defaults, can include new colors, and can even contain more submenus.
The new [INTERLNK] block will be fairly simple to build, as you see here. [INTERLNK] MENUITEM SERVER,Load Interlnk as server MENUITEM CLIENT,Load Interlnk as client
Then I'll have to build two new blocks, the [SERVER] and [CLIENT] blocks. They'll actually contain the same text in the CONFIG.SYS, but they'll look different in the AUTOEXEC.BAT. These new blocks will look like this. [CLIENT] INCLUDE SHARED DEVICE=C:\DOS\INTERLNK.EXE [SERVER] INCLUDE SHARED DEVICE=C:\DOS\INTERLNK.EXE
The reason why I even bothered with two different configurations is that the commands in the AUTOEXEC.BAT have to be different in this situation. A piece of the AUTOEXEC.BAT might look like the following. IF %CONFIG%==CLIENT GOTO CLIENT IF %CONFIG%==SERVER GOTO SERVER :CLIENT PROMPT $P$G PATH C:\DOS INTERLNK GOTO END :SERVER C:\DOS\INTERSVR GOTO END :END
In the server configuration, there's no need to set PROMPT and PATH, as the server computer just sits there with an Interlnk status report on the screen; you can't get a DOS prompt or execute programs anyway. Put the whole CONFIG.SYS together, and it looks like this. [MENU] MENUITEM NORMAL,Standard setup SUBMENU INTERLNK,Setup with Interlnk driver MENUDEFAULT NORMAL,2 [SHARED] FILES=60 BUFFERS=30 STACKS=9,256 DEVICE=C:\DOS\HIMEM.SYS DOS=HIGH [NORMAL] INCLUDE SHARED [INTERLNK] MENUITEM SERVER,Load Interlnk as server MENUITEM CLIENT,Load Interlnk as client [CLIENT] INCLUDE SHARED DEVICE=C:\DOS\INTERLNK.EXE [SERVER] INCLUDE SHARED DEVICE=C:\DOS\INTERLNK.EXE
In case it hasn't been made clear yet, submenus don't change anything about the way that you write your AUTOEXEC.BAT. The only way that submenus (or the main menu, for that matter) can affect AUTOEXEC.BAT is through communicating the value of the %CONFIG% environment variable.
Where could you use submenus? A lot of COMPUTE readers own PCs that are shared by several people. For example, some companies have a pool of laptop computers that people borrow temporarily from the pool prior to going on a business trip. One of the biggest gripes that the people who use those computers make is that when they get the laptop back after someone else has used it, the configuration has been all messed up.
In many private homes there's only one computer shared by Mom, Dad, and Junior, and they all want to be able to keep their own configurations separate and distinct. Public access computers, such as the ones that are starting to appear in public libraries, may need to serve as connecting points to databases of very different types, requiring different access methods.
MultiConfig can help to solve these three problems with its single-level menu. In the home example, Mom, Dad, and Junior could each have a menu item, but with submenus, it's possible for Mom to have 3 of her own configurations, Dad to have a couple, and Junior to keep separate the 14 different configurations he needs to run all his games.
And an arrangement like this actually provides a use for the MENUCOLOR command that I mentioned in August One way to be sure that you haven't accidentally activated someone else's menu is to color each menu differently. This is more useful than it would seem at first glance. Imagine that Dad sits down to use the PC and he reboots and (out of habit) presses 2, then 1, and then Enter, as that combination always gets him to the configuration he typically uses. Instead of ending up in Quicken, however, he quickly finds himself (or, rather, finds his cursor) being chased by the minions of the ravenous bug-blatter beast of Traal. What's happened to Dad, of course, is that he's accidentally gotten into Junior's menu. But if the screen had turned red when he got to Junior's submenu, he would've noticed it (Dad uses a menu with a sedate gray background) and rebooted straight off.
There's more to MultiConfig--Clean Boot, Interactive Boot, and Num Lock control, for example--but that stuff's easy to pick up from the manual. In this series, I've tried to get you started with the most important MultiConfig commands. Now you can go forth and create The CONFIG.SYS from Hell.
I try to answer all the calls and letters I get; sorry I've fallen a trifle behind recently. Let me make a request if you feel like contacting me this month. Virtually all of you have expressed happiness with this column and my books, but tell me more. I have a pile of things that I'm working on now, but I don't know if they're the kind of things that you want to read about. Tell me what you'd like to see in the column, and I'll do my best to respond.
Do you have a tough hardware problem you'd like Mark to tackle? Let him know about it by calling (900) 884-8681, extension 7010202 (sponsored by Pure Entertainment, P.O. Box 186, Hollywood, California 90078). The call will cost 95 cents per minute, you must be 18 or older, and you must use a touch-tone phone.