By Al Fasoldt
Copyright © 1998, Al Fasoldt
Windows no longer needs a CONFIG.SYS. That's good. But it sure can use one. If you don't have one on your system, you're missing out on a lot.
In the bad old days, the only way to get certain things done when a computer booted up was through two files stored in the main directory of your boot disk. They're AUTOEXEC.BAT and CONFIG.SYS. Lord only knows why two files were needed—one would have done nicely if Microsoft had changed the way DOS works—but some things are just plain never going to be explained. So we've been stuck with a batch file (AUTOEXEC) and a sys file (CONFIG) for years and years.
Batch files are just lists of commands. Many PC users who wouldn't get within seven yards of their CONFIG.SYS will merrily muck up their AUTOEXEC.BAT with line upon line of commands, for the simple reason that batch files are easy to understand. Type a command on a line in a batch file and the PC does whatever the command says. Neat.
But SYS files? What the heck are SYS files? Ah, here's where Microsoft laid an egg. SYS files are one thing (or many things, depending on how deep you want to go into the way your computer works), but CONFIG.SYS is something else again. It's not a SYS file the way nearly all other SYS files are. It, too, is just a list of commands It, too, is just a text file that has instructions for the computer, line by line.
Sigh! Didn't I just tell you Microsoft should have rolled those two files into one and made life a little easier for us?
So that's the first thing I want you to remember. CONFIG.SYS is like AUTOEXEC.BAT. For a very important reason, it's not exactly like it, but it sure does have a lot of similarities. That important reason it's not really the same has to do with the way PCs running DOS and Windows get themselves organized each time they start. When you get up in the morning, you have to find your clothes, brush your teeth and feed the cat; when PCs get going, they have to find their drives, check their peripherals and feed their memory banks.
CONFIG.SYS does most of this. As we'll see shortly, some of the things CONFIG.SYS does can be handled by AUTOEXEC.BAT and vice versa. But there are important tasks that only CONFIG.SYS can handle.
The reason: CONFIG.SYS always goes to the front of the line when the PC boots up. After the PC runs its built-in BIOS routines—the code in the Basic Input Output System, if you want to win a trivia contest—it looks for a CONFIG.SYS to find out what to do next. This is done in slightly different ways in old and new PCs, but the principle is the same. This means CONFIG.SYS gets a chance to do its thing before DOS has a chance to load its command processor. (Let's not get technical. Part of DOS is just a bunch of code for dealing with disks and the screen, that sort of thing, and the other part is called the "command processor." When you type a command or when a batch file gives a command, the command processor does the work.)
This is pretty important stuff. CONFIG.SYS can tell the PC to load memory managers or CD-ROM drivers or network thingamabobs before DOS gets a chance to find out what's happening. (And for good reason, too: If the PC tried to load that kind of stuff after DOS finished loading, a lot of it wouldn't work.) There's more: CONFIG.SYS can even push the DOS command processor out the door and load a substitute. (That's what the shell= line in CONFIG.SYS does. Very few users ever stick a substitute command processor onto their PCs these days, but it can be done very easily just by naming it, with the full path, right after the shell= statement.)
Now we get to the good part. Because CONFIG.SYS has all this stature, and because it gets first crack at memory and other things before DOS can grab anything, you're always better off putting commands in CONFIG.SYS and not AUTOEXEC.BAT … if you can get away with it. Fortunately, many of the items that have been routinely written into a PC's AUTOEXEC.BAT can, indeed, be put instead into CONFIG.SYS.
PATH is a good example. Your can put the PATH statement in AUTOEXEC.BAT—in fact, that's nearly always where it's put—but a better way to specify the PATH is in CONFIG.SYS. (For one thing, the PATH will be established before the command processor even starts running. For another, the PATH statement takes up slightly less memory when you put it in CONFIG.SYS than when you stick it in AUTOEXEC.BAT.
All the SET instructions fit in this category, too. Most users (probably, nearly all users) who have functioning AUTOEXEC.BATs have their SET instructions in the wrong place. Put them in CONFIG.SYS, not AUTOEXEC.BAT.
One advantage AUTOEXEC.BAT normally has—because it runs only after the command processor has taken over—is that it can run programs. You can't get CONFIG.SYS to do that. Right?
Wrong. CONFIG.SYS can run programs. It won't run Microsoft Word or your Internet browser, but it can run utilities that insert themselves into memory and stay there. (In fact, any program loaded by CONFIG.SYS generally has to remain in memory because of a quirk in the way PCs work.) The command that does this is INSTALL (or INSTALLHIGH, which uses memory better). Typical programs that can be loaded by CONFIG.SYS include FASTOPEN and SHARE (both of which are off-limits in Windows 95 on up, however). But many other small programs will load nicely in CONFIG.SYS. If you are loading some sort of utility in your AUTOEXEC.BAT using a LOAD or LOADHIGH command and want to see if it works when it's loaded by CONFIG.SYS, go ahead and try it. It might not work, and you might get a crash, so boot up and test simple operations before you do anything serious.
To test an INSTALL or INSTALLHIGH command in CONFIG.SYS, just put a question mark in front of the line containing the command. When the PC boots up, you'll be asked if you want to activate the command in that line. If something goes wrong, reboot and skip that line when it comes up, then edit CONFIG.SYS and take the line out.