By John Woram
Here's a resolution to consider as the new year approaches: Ring in 1997 with a thoroughly optimized Win95 configuration.
If you're like most users, you upgraded to Win95 by installing it on top of the Win3.x foundation. This is no doubt the simplest upgrade route, but it means carrying some excess baggage in the form of various Win3.x files that you no longer need. With a little analysis, and a lot of luck, you can discard some of that accumulated 'stuff," but there's still only one proven method to get rid of it all.
Oh no-not the FORMAT command!
Well, yes. But it's not as bad as it sounds. One of the "perks" of software beta testing is that I get to completely trash my system on a regular basis. And with all due respect to the assorted sages who preach from the gospel of regular backup, sometimes the easiest way to recover from such disasters is to ignore all good counsel and just start over. Even if you have not yet demolished your own configuration by installing some not-quite-ready-for-prime-time application, you still may have encountered the ghosts of configurations past returning to haunt your new Desktop. In such cases, there's nothing like a good FORMAT C:, which remains one of the surest methods known to mankind to exorcise the evil software spirits. Although some regard this as the binary equivalent of curing the disease by killing the patient, it's effective, and with a bit of effort, the patient can be un-killed later on, as I've discovered many times.
Based on my experience performing more restore operations than I will admit in public, here are a few steps that have helped me turn near-death experiences into a thoroughly delightful way to pass a few hours. OK, I'm exaggerating just a bit, but if you now regret building your Windows 95 on top of a Windows 3.x foundation, the following is a means to start over and live to tell about it.
I've laid out a step-by-step procedure that includes a complete strip-down of whatever is currently on drive C:, which means that you'll need a boot diskette with CD-ROM drive support. You may not need, or want, to follow all the steps, so just choose those that are appropriate to your system.
Of course, you'll want to back up and restore your critical documents and other files. However, the odds are good that your current configuration contains at least a few essential files that you won't be aware of-until they're gone. So go ahead and do the full backup, even though you know you'll never need it. With luck, you won't. After your backup tape has collected six months or so of dust, you can consider scrapping it.
Next, format a boot diskette. Use Windows 95 for the format procedure, by opening Add/Remove Programs from the Control Panel and going to the Startup Disk tab. Otherwise, use whichever DOS version is handy. Note that it doesn't matter which DOS version you use. If you plan to eventually configure the system to dual-boot into either Windows 95 or DOS 6.x, then make sure you also have a formatted system diskette containing that version of DOS. You won't necessarily need it for booting, although you certainly can use it for that purpose. But you will need the system files on it, as I'll explain later.
When you eventually boot from diskette, you'll want your CD-ROM drive and other critical devices to be enabled. One way to make sure the boot diskette has all the necessary support files on it is to copy the CONFIG.DOS and AUTOEXEC.DOS files to the diskette, then rename them as CONFIG.SYS and AUTOEXEC.BAT. In case of doubt, just type VER at any command prompt, and make sure the reported DOS version doesn't mention the magic words "Windows 95." If your system is currently running in MS-DOS 6.2 or earlier, then the existing CONFIG.SYS and AUTOEXEC.BAT files can be directly copied to the boot diskette.
Once the correct CONFIG.SYS and AUTOEXEC.BAT files are on the diskette, review the contents of each, line by line. For each line that cites a drive letter and path- and filename, copy the cited file to the diskette and then delete the drive letter and path from the file. Thus, your CD-ROM device driver line would be edited as shown here:
Before: device=X:\<path>\whatever.sys /d:MSCD001
After: device=whatever.sys /d:MSCD001
The character string following the /d switch may vary from that shown here, and there may be additional switches on the command line. Just make sure you remove the drive letter and path, and nothing else, from the line. When you edit AUTOEXEC.BAT, make sure the MSCDEX line is correctly edited (as above) and that the MSCDEX.EXE file is copied to the boot diskette.
Remove any line that loads mouse-support software, SmartDrive or any other disk-caching system, all of which you no longer need because Windows 95 takes care of those tasks. If you already know that Win95 will recognize a currently installed adapter card (network, sound card and so forth), then you might also remove the line that supports that card, and not bother copying the cited file to the diskette. In case of doubt, take the cautious route: Copy the cited file to the diskette, but also disable the line in CONFIG.SYS or AUTOEXEC.BAT by typing REM at the beginning of the line. If you subsequently discover the line is needed, delete the REM to re-enable it.
You may want to copy one or more of the following files to the diskette, for the reasons given below. In each case, make sure you copy the file version that matches the operating system on the boot diskette.
ATTRIB.EXE: It's convenient to have this file available in case you need to clear or set attributes on various system files.
DEBUG.EXE: If you're not sure you need this one, then you don't. But if you regularly use it to perform minor emergency surgery, this is a reminder not to overlook it.
EDIT.COM: This is useful if you must make an unexpected edit during the general procedure. If you're using an MS-DOS 6.2 or earlier boot diskette, copy QBASIC.EXE to that diskette, since EDIT.COM needs it to do its work in those versions.
EXTRACT.EXE: This file (currently in the C:\WINDOWS\COMMAND folder) is helpful if you need to extract a file from the Windows 95 CD-ROM. Otherwise, there's no need for it at the present time.
FDISK.EXE: You'll need this file if you're going to partition (or repartition) your hard drive as part of the general cleanup procedure. There is, however, no need to run Fdisk if your current partitioning scheme is satisfactory. If you do want to change it, you'll be happier using PartitionMagic (see my September column for more details).
FORMAT.COM: You'll need this if you're going to format drive C: after booting from the diskette and before installing Windows 95.
SYS.COM: This file may also be convenient if you're using a Windows 95 boot diskette, in case you need to transfer the Windows 95 system files to the hard drive. Otherwise, you won't need it, because there's no reason to transfer DOS 6.2 (or earlier) to the hard drive-but more on this later in this column.
OTHER.EXT?: Are there any other files that you know you're going to need? If so, add them to your list.
Once you've backed up everything on the hard drive that you know you're going to want later on, then your patient is ready (almost) for the operation. But first, take a final look at the hard drive to make sure you've backed up every file that you might want later on. Assuming you've backed up the whole works anyway, you may still want to make straight one-to-one copies of a few critical files. For example, if you've used an electronic mail system, make an extra diskette copy of the files containing your recent messages and address book-MAILBOX.PAB and MAILBOX.PST (or similar)-just so you don't have to bother trying to extract them from the backup tape.
If your system CMOS has been configured to bypass drive A: during startup, don't forget to reconfigure it so that the boot diskette will be found and used. Then insert the boot diskette in drive A: and reboot. Once the DOS command prompt shows up, log onto your CD-ROM drive and make sure it's operational: typing DIR X, (where X represents the letter of your CD-ROM drive) should be sufficient. If you see a good directory listing, then all's well with the drive.
You're now ready to format drive C:. For those using the Win95 Upgrade package, make sure you have diskette 1 from Windows 3.x. This is critical, since the Windows 95 Upgrade diskettes or CD-ROM will want to verify that you qualify for an upgrade from Win 3.x to Win95. It's not, however, necessary that any files of Win3.x be physically present on drive C:.
After you've formatted drive C:, log onto the drive where Windows 95 resides, and run SETUP.EXE. If you're using the Win95 Upgrade diskettes or CD, you'll be prompted to insert diskette 1 from your previous version of Windows.
You can select one of four setup options-typical, portable, compact, custom. Although the custom option takes the longest, it's time well spent because you'll get the opportunity to select just those options you want installed. Go to the trouble of reviewing each one, click on the various Details buttons and go down the list of installable items. Check those you want and clear those you don't want. If you discover you need some excluded option later on, you can install it via Control Panel's Add/Remove Programs icon.
If you want to run an old version of DOS, you can press function key F8 when the "Starting Windows 95" message appears during startup. The last item on the Startup Menu is always "Previous version of MS-DOS," even if there isn't any, as would be the case if you've just installed Windows 95 on a clean hard drive. If you select the "Previous version" option anyway, a brief message advises that "Your previous MS-DOS files were not found. MS-DOS startup failed" and the Windows 95 GUI opens.
If you need to go back to your old DOS to run programs that don't work well in Win95, just dig out that old DOS system diskette and clear the system, hidden and read-only attributes on its IO.SYS and MSDOS.SYS files. Then rename them as IO.DOS and MSDOS.DOS, and also rename the diskette's COMMAND.COM as COMMAND.DOS. Now copy all three files to the C:\ (root) directory on the hard drive, and reset the system, hidden and read-only attributes on the IO.DOS and MSDOS.DOS files. The next time you select "Previous version of MS-DOS" during startup, the files will be found and the system will boot into that version of DOS.
When operating in any pre-Windows 95 version of DOS, you may need some of the DOS files formerly found in the C:\DOS directory. In Windows 95, many of the external commands handled by these files are now supported by equivalent Windows 95 files. Therefore, if Windows 95 was installed as an upgrade over an existing version of Windows 3.x, the older versions in the C:\DOS directory were erased as part of the setup procedure. This is because these files (CHKDSK.EXE, FDISK.EXE, FORMAT .COM and others) are incompatible with Windows 95, and their updated replacements are now in the C:\WINDOWS\COMMAND folder. But of course, just as the old versions won't work under Windows 95, neither will the new versions work under the old DOS. Therefore, you'll need to restore the contents of the old C:\DOS directory from the backup you made. Don't reinstall the old DOS though; just copy the files you need back into a C:\DOS directory. Do this on an as-needed basis, and you can save a bit of space by not restoring old DOS files that you never use.
Now you can begin reinstalling just those applications that you need. Do a clean setup from the original distribution diskettes, and just go to your backup tape for documents and other files that you created prior to the cleanup operation. Give it a year or so and you'll have a completely new collection of clutter. By then it'll be time for another New Year's resolution.
Senior Contributing Editor John Woram is the author of The Windows 95 Registry: A Survival Guide For Users (MIS: Press, 1996). Contact John in the "Optimizing Windows" topic of the WINDOWS Magazine areas on America Online and CompuServe, or via e-mail. John Woram's e-mail ID is: firstname.lastname@example.org