Optimizing Windows 9x/Me Startup

You hit the power button on your PC. Then you go get a soda, grab a bagel, do a crossword, rent a movie, and take a cab to the opera--and when you return to your workstation to start your busy day, Windows just might be ready for you.

Of course, you don't have to put up with such nonsense. Your PC has a fat list of important things to do between the moment you switch it on and when Windows finally relinquishes control of the mouse pointer to your waiting hand, but some of the less necessary steps can be shortened or eliminated.

The Win9x Boot Process: a Quick Overview
The boot process starts when you turn on your computer. The system BIOS provides the CPU with its first set of instructions, sometimes called the bootstrap. The CPU executes the BIOS instructions, which normally include a POST (power-on self test), which is a quick scan to determine whether various core hardware components are installed and working properly. The system BIOS code and firmware found on expansion cards also perform basic controller and device initialization functions. Motherboards created in the past five or six years also check for plug-and-play hardware, and figure out what resources are required.

The BIOS then instructs the processor to look at the PC's storage devices and to try to find an operating system. If and when it does, the system BIOS initializes its IPL, or initial program load. The IPL locates and executes a file called IO.SYS, which contains instructions for loading Windows.

Windows then thanks the BIOS for its hard work and takes over. IO.SYS loads a memory manager (HIMEM.SYS), a minimal file system (IFSHLP.SYS), and a hack to make DOS programs believe they're running on whatever version of DOS they expect (SETVER.EXE). Then it reads and/or executes several files, including MSDOS.SYS (which defines a number of startup parameters), COMMAND.COM (the DOS command interpreter), and, in Win9x versions prior to WinMe, startup files CONFIG.SYS and AUTOEXEC.BAT.

WIN.COM, Windows' protected mode loader, is then executed. WIN.COM loads Windows' virtual device driver library, VMM32.VXD, which subsequently loads various real-mode drivers before switching Windows into protected mode. The BIOS software-based interrupts are rerouted to give Windows full control over system devices, and each device is further initialized beyond any basic firmware initialization. GUI components are then loaded, the network environment is initialized (you'll be asked to log in at this point, if your PC is networked and login is required), and finally registry startup programs and Start Menu programs are executed.

There are three areas of boot process that lend themselves to performance tuning: the BIOS setup, the MSDOS.SYS file, and Windows startup items. Before you start tweaking, use a watch with a second hand to measure your system's boot time from when you first power it on until you're given full control of the mouse pointer. Jot it down so you can compare later, after you've streamlined the boot process.

You can whittle seconds off a system's overall boot time by streamlining the BIOS' role in the process. One obvious benefit to BIOS tweaking is that it doesn't matter which operating system you're running--cutting BIOS boot tasks can reduce your startup time for Win9x/Me, NT/2000, Unix, Linux, BeOS, OS/2…you name it.

The amount of control you're given over the BIOS setup varies according to the whims of motherboard and system manufacturers. Mass market PCs sold to general consumers, including systems from Compaq, Dell, HP, Gateway, and others, don't offer many BIOS customization options. Motherboards sold as standalone products by manufacturers like Abit, MSI, ASUS, AOpen, and Supermicro, usually feature very customizable BIOSes.

Most BIOS setup programs are organized in tabs or groups of options with headers like Standard (where you can set the date and time), Advanced (where you're given access to wait states, boot sequence settings, and so on), Chipset features (which include AGP settings and cacheable memory areas) IDE hard disc setup, security options, and power saving features.

Speed up the POST (power on self test). Most BIOS programs run a diagnostic on the system's memory and other components before completing the POST. Depending on the amount of RAM in a system, a thorough test can take more than just a few seconds. Look in an advanced feature section or boot options tab for an option to enable fast Boot, quick POST or a similarly named toggle Alternatively, you may need to disable thorough memory test or something with a similar title. You are trading off reliability tests if you disable these features, but the odds are strongly in your favor that your system will not have memory or other low-level problems that such tests might detect.

Configure your IDE devices. A modern BIOS typically auto-detects every device attached to the IDE interfaces every time the computer is subjected to a cold boot. The detection process takes several seconds, and if you don't swap out your IDE hard drive or other devices very often, there's no reason to wait for it. Enter the BIOS-based IDE hard drive setup applet, let it detect your drives, and set the rest of the devices to none (as opposed to auto or autodetect). Windows will still find your non-hard disk IDE devices (like CD-ROM, DVD-ROM, CDRW, Zip, LS-120, tape backup, and other drives).

Put your hard drive first. Windows boots off a fixed disk, allowing you to chip a second or two off startup time by configuring the BIOS boot sequence to look for your hard drive first. Most BIOS code, by default, looks for a boot partition first on the floppy drive (A:) or sometimes on a CD-ROM drive, before looking at the hard disk. Look in an advanced options or boot device section of your BIOS setup program, and scoot your C: drive to the head of the line. Also, if a "floppy seek" option is offered, disable it. Just remember to reconfigure your BIOS if you ever need to boot from a floppy!

The IO.SYS file depends on MSDOS.SYS to tell it how you want your system booted. Streamlining this file can seriously reduce your boot time.

To edit MSDOS.SYS, you'll first need to make it visible and write-enabled. Navigate to your C drive's root directory with Windows Explorer. Make system files visible by pulling down the Tools menu (in WinMe) or the View menu (in Win98) and selecting Folder Options. Click on the View tab, and click on "Show hidden files and folders" in the Advanced Settings list. If you're running WinMe, uncheck "Hide protected operating system files."

Click OK and take a look at the root directory. Locate the MSDOS.SYS file and right-click on it. Select Properties, and in the resulting dialog box uncheck the Read Only attribute. Click OK.

Next, create a backup of the file by right-clicking on it and selecting Copy, and then right-clicking in an empty area of the Explorer window and selecting Paste. A file called "Copy of MSDOS.SYS" will appear; if you hose your MSDOS.SYS file, you can safely replace it with this copy.

Open MSDOS.SYS with Notepad. You'll probably notice right away that the file ends with twenty or so lines of X's. Leave them alone; the MSDOS.SYS file has to be over 1024 bytes to function properly, and to convince other system files that it's not infected with a virus.

The rest of the file is divided into two sections: [Paths] and [Options]. The [Paths] section contains lines that point to your Windows boot directory and its host drive letter-- leave those parameters alone too.

The [Options] section will contain a few lines, but they by no means represent the only parameters recognized by MSDOS.SYS. Here is a list of items recognized by MSDOS.SYS:
SETTINGS VALUES
Autoscan= (tells Windows whether to run Scandisk after an improper shutdown) 0 (No scan)1 (Prompt user, and scan if no response) (Default)2 (Scan automatically with no user interaction) (Our recommendation)
BootDelay= (configures delay to allow user to enter startup menu)(Win98 Only) 0-2 seconds. WinMe defaults to 0, which we recommend for any Windows OS. Windows 98 defaults to 2.
BootGUI= (tells Windows whether to boot right into the its graphical interface)(Win98 Only) 0 (Starts at command prompt)1 (Default--starts Windows GUI) (Our recommendation)
BootMulti= (toggles dual booting with previous DOS version) 0 (Disable) (Our recommendation)1 (Enable)
DblSpace= (tells Windows whether to load dblspace.bin) 0 (No) (Don't use disk compression. ) (Our recommendation). 1 (Yes. Windows will unload dblspace.bin if it doesn't encounter a compressed drive, but it's faster not to load it in the first place.)
DrvSpace= (tells Windows whether to load drvspace.bin) 0 (No)(Our recommendation)1 (Yes)(See DblSpace= above)
Logo= (tells Windows whether to display the animated logo while booting) 0 (No)(Our recommendation)1 (Yes)
DisableLog= (tells Windows whether to generate a boot log (bootlog.txt)) 0 (No)(Our recommendation)1 (Yes)
DoubleBuffer= (tells Windows whether or not to use hard disk double buffering) 0 (Never)(Our recommendation--it's rarely ever needed by modern controllers)1 (Use when necessary)(Slows boot time, because Windows must determine on its own whether or not double buffering is necessary)2 (Use always)(Only necessary in extremely rare configurations; mostly older SCSI cards)

Edit your MSDOS.SYS, save your changes and restore the file to its read-only state. A streamlined MSDOS.SYS file might look like this:


[Paths]
WinDir=C:\WINDOWS
WinBootDir=C:\WINDOWS
HostWinBootDrv=C

[Options]
BootMulti=0
BootGUI=1
AutoScan=2
DblSpace=0
DrvSpace=0
Logo=0
DisableLog=1
DoubleBuffer=0
WinVer=4.90.3000
;
;The following lines are required for compatibility with other programs.
;Do not remove them (MSDOS.SYS needs to be >1024 bytes).
;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa
;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb

...followed by many more lines of X's.

If your PC experience started after Windows 95 took root, you may not have much experience with the AUTOEXEC.BAT and CONFIG.SYS files. Their very mention sends chills through the spines of former (and current) DOS users. In fact, you can actually cause a pre-Win95 gearhead to pass out just by saying the words "expanded memory".

CONFIG.SYS and AUTOEXEC.BAT are the bastard twins that handle driver loading, TSR initialization, memory configuration, and other menial tasks for real mode DOS--and for some legacy applications running on Win9x. Windows does everything it possibly can to ensure that you'll never actually need these files or their command line instructions, and unless you're hopelessly dependant upon a very old and quirky program, or addicted to a pre-1996 game, you probably don't.

In fact, Microsoft is so confident that you don't need real mode support anymore, it's almost completely hidden the legacy aspects of Windows Me. Unlike other Win9x operating systems, WinMe doesn't process the CONFIG.SYS or the AUTOEXEC.BAT files. It does, however, scan them for environment variable changes, which it imports into the registry to configure its virtual DOS mode.

Regardless of your Windows version, rename the CONFIG.SYS and AUTOEXEC.BAT files with a dummy extension, so they won't be recognized, scanned, or parsed by IO.SYS. If any of your legacy applications hiccup, you can always restore the files later.

Microsoft products constantly get panned for being bloatware, and rightfully so; most of the time, nobody wants or uses the added "features" that separate one version of Windows--or Office or Encarta or Microsoft Bob (OK, the Bob thing is here as a joke)--from the next. Occasionally, though, an added program or applet is surprisingly welcome and embraced by many members of the user community. Such is the case with the System Configuration Utility.

Invoke the SCU by selecting Start from the Run menu, and punching "msconfig" in the text box. Hit enter, and a compact and versatile utility will appear.

When the arduous process of booting into Windows is nearing completion, the OS starts loading applications, applets, TSRs and other bits of code, as instructed both by the registry and the Startup program group. Traditionally, only about 20% of these applets are actually useful; the rest take up memory space, tray space, and system resources. Plus they extend the Windows boot time unnecessarily when loaded from their various locations.

The SCU is intended as a troubleshooting aid, and it is, but our favorite aspect of its functionality is how it makes eliminating startup programs simple. It saves us the hassle of deleting or renaming shortcuts and messing about in the registry. The utility's little window is divided by several tabs. For the purpose of speeding up Windows' load time, you'll be concentrating on the Win.ini tab briefly, and then shifting the rest your attention on the Startup tab.

Click on the Win.ini tab. You'll be shown a browsable representation of a text file, which in turn contains instructions and variables divided into groups. The Win.ini file only exists to cater to 16-bit Windows programs designed for Windows 3.x.

Click on the Win.ini tab, and expand the [windows] group (it should occupy the first line). Look for two entries: one will start with "load=" and the other with "run=". If there is anything after either of the equals signs, uncheck the box next to the offending line or lines. Later, after you reboot, run any legacy applications installed on your system and watch for problematic behavior. If you encounter any problems, return here and re-check the checkbox or boxes.

Next, visit the Startup tab. You'll see a list of all of the applets and TSRs that are loaded through your Startup program group and the Windows registry. Even Windows itself pollutes your startup groups with generally useless applets. Some of the most common offenders are:

TaskMonitor: An applet that keeps track of program access and used for disk optimization. Feel free to disable it.

LoadPowerProfile: Imports power save settings. Necessary for laptops, but optional for desktop PCs. If you don't use power saving features, disable it.

SchedulingAgent: Used to schedule background operation of certain programs. Disable it if you're not interested.

Microsoft Office Startup: Loads Office libraries to expedite MS Office startup--once you decide to launch it. Disable it; it doesn't make a noticeable difference, even to constant Office users.

*StateMgr: (WinMe only) A component of Windows System Restore. Without it, System Restore won't work; but if you back up your important files like you should, you probably don't need System Restore. Note: you can disable System Restore through the Control Panel's System applet: click on the Performance tab, click the File System button, and choose the Troubleshooting tab, and check the "Disable System Restore" checkbox.

Explorer: Windows default shell; leave this one alone.

SystemTray: Operates that little icon bar next to the clock. Leave it alone.

WinAmp Agent, Realtray, and other multimedia player applets: Often dropped into place by various media players, these tiny applets usually place an icon in the system tray and shove bits of their code into memory. Disable them.

Sound, video, and other multimedia device applets: Often, drivers for sound cards, graphics cards, modems and other devices load configuration applets, which they make accessible through system tray icons. In most cases, the devices function perfectly without these applets loaded, and you can invoke them at will if you wish to configure the device in question.


Depending on the applications and drivers you've installed, you'll see different entries in SCU's Startup tab. Experiment with them, and don't worry if something doesn't work; you can always reenter SCU and fill in checkboxes to restore startup applets.

Items you've disabled through the SCU aren't altered in any way; in fact, their shortcuts and registry entries aren't even deleted, they're moved. Startup group items are moved to a new Start Menu group called "Disabled Startup Items." Registry strings are moved from their native keys (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and \RunServices) to new, temporary keys that are ignored (\-Run and \-RunServices).

After you've tweaked your BIOS, dumped your legacy startup files, optimized your MSDOS.SYS file, and purged your startup folders of unneeded applets, measure your cold-to-cursor startup time again. You're sure to have shaved several seconds off the wait; with an earnest effort, you can reduce the load time on an overused Win98 machine to less than one minute. Maybe you can sell those opera tickets on EBay.

In this case, study, we'll show you the results we received when optimizing a test PC. Before our optimizations, our test system was configured as a typical home-use PC. We installed a fresh version of Windows 98 SE and added all of the current critical updates via Windows Update. Next, we installed Microsoft Office 2001, Internet Explorer 5.5, RealPlayer 8 Basic (minimum components), WinAmp 2.75, and several games (including Quake 3 Arena, Serious Sam and Black and White). We accepted all defaults during the setup of each program, and we restored the BIOS Setup defaults, too.

We measured the system's startup time with a stopwatch from the moment we hit the power button until the hard drive stopped churning after the GUI was loaded.

First, we optimized the BIOS by enabling Quick Power-On Self Test and defining our solitary hard drive. We set the other three EIDE channels from Auto to None. This cut the boot time by a full 9 seconds, reducing it from 84 seconds to 75. While our system had 128MB, if it had more RAM for the POST to investigate, this measure would have saved even more time.

We nipped another 10 seconds off the boot time by wringing out the MSDOS.SYS file. We added or modified the following lines in the [Options] section:

BootDelay=0
BootMulti=0
DblSpace=0
DrvSpace=0
Logo=0
DisableLog=1
DoubleBuffer=0

Having cut startup time down to 65 seconds, we entered Windows and fired up the System Configuration utility. Noting that there weren't any programs listed in the WIN.INI's run= and load= lines, we focused our attention on the Startup tab. We disabled Microsoft Office's annoying little applet, cut out WinAmp Agent, laid off RealTray and shut down LoadPowerProfile. Since we tend to reformat this particular hard drive every week or so in the course of testing hardware and writing articles like this one, we also eliminated TaskMonitor and Scheduling Agent (note that these apps are useful for drive maintenance with more permanent Windows installations).

When the dust settled, we'd managed to cut the startup time of this system to just under a minute; we were two seconds shy of shaving off a full 30 seconds. Considering that the entire optimization process took about 15 minutes (or 900 seconds), it'll pay for itself in time saved after we've booted the system 33 times.

The System

CPU: Athlon 1.1GHzMotherboard: ABIT KT7

RAM: 128MB PC133

OS: Windows 98 SE with all critical updates (as of June 12, 2001)

Hard Drive: 30GB Ultra-ATA/66

Floppy Drive: Generic 1.44MB

Optical Drive: Sony CRX140E 8X/4X/32X EIDE CDRW drive

Graphics Card: NVIDIA GeForce2 Ultra 64MB, v.12.41 official drivers

Sound Card: Philips Acoustic Edge, v.2.46 official drivers

Network Adapter: 3Com HomeConnect 3C450 (using device drivers only, no proprietary network software installed)

Default Startup Time: 84 seconds.

Optimized Startup Time: 56 seconds.



Action Results Startup Time
None Unoptimized Startup Time :84
BIOS tweaks: turn on Quick POST and define the IDE drives Cut the post by 9 seconds :75
Overhauled the MSDOS.SYS file Reduced pre-GUI startup time dramatically :65
Using the SCU, prevented several TSRs from loading at startup Cut the time it takes for Windows to stop thrashing the hard drive Final, optimized startup time :56

Copyright (c) 2005 Ziff Davis Media Inc. All Rights Reserved.


at:  http://www.extremetech.com/print_article2/0,2533,a=12641,00.asp