Search the Catalog
Optimizing Windows for Games, Graphics and Multimedia

Optimizing Windows for Games, Graphics and Multimedia

By David L. Farquhar
1st Edition December 1999 (est.)
1-56592-677-3, Order Number: 6773
280 pages (est.), $24.95 (est.)

Chapter 10
Clean Windows Installation

If you installed Windows 95 as an upgrade to Windows 3.1, or Windows 98 as an upgrade to any earlier version of Windows, your Windows setup is carrying lots of extra baggage. If you've upgraded many of your peripherals since first installing Windows 95, your Windows setup is probably carrying extra baggage. Unless your PC has been spending its days since 1995 or 1996 in the closet, chances are there's plenty of extra stuff hanging around that doesn't need to be there. You can whip your system into better shape with a heavy dose of utilities, but the best way to get your system running its best is probably to do a clean installation.

First Steps with Windows 95

Reinstalling Windows 9x doesn't have to be (and shouldn't be) as difficult as installing it the first time. The hard drive is formatted and makes a fine repository for data, so we might as well make use of it.

The first thing to do is copy the Win95 directory of your Windows 95 CD to the hard drive. We'll be making modifications to the files in that directory, so you don't want to skip this step. It's much faster to install from the hard drive than from CD anyway. Obvious locations to copy to are C:\Win95 or C:\Win98 (keeping with the structure of the CD) and C:\Windows\Options\Cabs (which is the standard location OEMs use). C:\Win95 or C:\Win98 is better, since we'll be moving the existing Windows installation later in the process.

You'll also want to copy the device drivers for your various peripherals (sound card, modem, video card, motherboard) into that directory. I typically just make a directory called drivers inside the directory to which I copy the Windows files, then copy the contents of the disk or CD that came with each peripheral into appropriately named directories (sound for the sound card, video for the video card, network for the network card, and so on). Better yet, get the newest drivers for your equipment. If you don't know who made all of your peripherals, download, install, and run SiSoft Sandra, from www.sisoftware.demon.co.uk, to get a detailed list of the hardware in your PC. Visit the hardware manufacturers' web sites to get the most recent drivers, then download and extract them into appropriate directories.

I can't stress enough the importance of getting all of the device drivers. Remember, Windows 95 is old technology. It's older today than Windows 3.1 was when Windows 95 came out. Remember that the most advanced PC available when Windows 95 came out was a 120 MHz Pentium. PCI was something new and novel. Arguably, the PC industry has changed more in the five years since Windows 95's release than it did in the five years before it.

A PC is only as fast and stable as the device drivers installed on it. So for optimal performance and stability, get the newest stuff, and don't forget your motherboard. Chances are your motherboard has drivers that enable DMA mode for your hard drive. (DMA is direct memory access, where the disk controller can bypass the CPU and dump data directly into memory, enhancing performance.) And if it's a recent motherboard with a non-Intel chipset, it probably has AGP drivers as well. (AGP is advanced graphics port, which enhances the speed and stability of video cards.) Acquire and install the AGP drivers! Your system will appear to work just fine without them, but it won't be nearly as stable as it would be with them. Many of the reports of Socket 7 instability floating around on the Web are due to people neglecting to install AGP drivers.

If you play many games, chances are you need DirectX and other post-release Windows 95 enhancements that have come from Microsoft over the years. If your games mention any of these enhancements during their installation, abort the install and go to www.microsoft.com to look for newer versions of any of those enhancements. If it turns out your game has the current release, go ahead and install what you have, but otherwise, download the newest release and install it instead.

Finally, if you don't already have one, make a boot disk. You don't want to boot off the same hard drive you install Windows to, because we're going to rename the Windows directory before installing and that'll mess things up. To make a boot disk, insert a disk, open a command prompt, and type sys a:. Now copy the crucial DOS utilities format.com, extract.exe, sys.com, fdisk.exe, and edit.com to that disk. Here's the sequence of commands, in case you need it:

Copy c:\windows\command\format.* a:\
Copy c:\windows\extract.* a:\
Copy c:\windows\command\sys.* a:\
Copy c:\windows\command\fdisk.* a:\
Copy c:\windows\command\format.* a:\
Copy c:\windows\command\edit.* a:\

It doesn't hurt to add ScanDisk to the list either. You may have moved ScanDisk as per my recommendations back in Chapter 3, Disk Optimization. To find it, go to Start ➝ Find ➝ scandisk.exe, then right-click on scandisk.exe, select Send To, then select 3.5" floppy.

You won't use the majority of these tools for installation (you'll need Edit and possibly Extract), but the rest of these tools are invaluable for repairing a hard drive that won't boot. The command sequence SCANDISK C: followed by FDISK /MBR followed by SYS C: will repair the vast majority of hard drive problems and get most systems booting again.

Hacking Out MSN and the Exchange Client

How does a minimum installation footprint of 18 MB for the August 24, 1995 release of Windows 95 sound? It's possible. The original Windows 95 was joined at the hip to Exchange and MSN, but both of these products are hopelessly obsolete today, and chances are you don't use either one of them. Even if you are an MSN subscriber, you probably have a CD with the newest version of MSN on it, which you should install instead. Windows is faster and more svelte without this old software.

Microsoft didn't intend for these components to be removed. It's easier than removing Internet Explorer from Windows 98, but you'll have to jump through a few hoops. This trick requires a working installation of Windows 95, so don't boot off that floppy yet.

The biggest hurdle we face is the setup program's compression routine. To save space on floppies and CD-ROMs, the Windows installation routine stores the installation files in compressed archives called cabinets, also known as cabs for short, because they have the extension .CAB. Cab files are similar in concept to (but of course incompatible with) the Zip files we're used to seeing online.

Open a command line and use CD commands to navigate to your installation directory. Now issue the following series of commands:

MD PRECOPY
CD PRECOPY
EXTRACT ..\PRECOPY1.CAB
EXTRACT ..\PRECOPY2.CAB
DEL ..\PRECOPY1.CAB
DEL ..\PRECOPY2.CAB
EDIT SETUPPP.INF

Now use Edit's Find function (it's in the Search menu) to find the lines referring to MOS.INF and MSMAIL.INF. Remove the line MOS.INF to remove MSN, and remove the line MSMAIL.INF to remove the Exchange client. Save the file and exit.

Most versions of Windows 95 and 95A seem to leave setuppp.inf alone if they find it during setup. If you want to be really safe, you can put the file back in its cabinet. Unfortunately, the only utility I could find that's capable of creating the .cab archives used by Windows 95's setup routine runs within Windows. You can download CabPack, by Lars Hederer, from ftp://ftp.simtel.net/pub/simtelnet/win95/compress/cabpck14.zip.

If you want to be absolutely, positively certain that you're rid of the baggage, launch CabPack. CabPack's defaults don't work with the original version of the Windows 95 setup program, so change the compression type to MSZIP. You should set CabPack's source directory to the location of your extracted files. The destination directory doesn't matter, since you'll have to move the files anyway. Use a cabinet name template of Precopy*.cab, and a maximum size of 1.44 MB. Hit OK, and CabPack will create two directories, one called Disk 1 and a second called Disk 2. Disk 1 will contain Precopy1.cab ; Disk 2, predictably, will contain Precopy2.cab. Copy these two files into your Windows installation directory, and skip the next section, which is specific to later versions of Windows 95.

OSR2.x's Excess Baggage

The OEM Service Release versions of Windows 95 contain even more stuff to hack out--adding Internet Explorer 3.0 or 4.0, the ICW Internet Connection Wizard, and competing online services to an already crowded lineup. Fortunately, these versions of Windows 95 make cleanup easier--there's no need to create .cab files. This software, too, is all obsolete, so you want to remove it. There's no need to have potential orphan DLLs installed, slowing down the system.

First, extract SETUPPP.INF from Precopy2.cab using the command:

EXTRACT PRECOPY2.CAB SETUPPP.INF

Now open LAYOUT.INF in Edit, Notepad, or your preferred text editor. Search for a line that reads SETUPPP.INF=2,,4550. Change the 2 to a 0. This keeps us from having to generate new .cab files the original Windows 95 requires. Save the file, then open SETUPPP.INF in your text editor. To remove MSN, take out the line mos.inf. To remove Exchange and Internet Mail, take out the line inetmail.inf. To remove Internet Explorer, take out the line ohare.inf. To remove the competing online services and the ICW Internet Connection Wizard, take out the lines athena.inf and msinfo.inf. To get rid of ActiveMovie (made obsolete by the new version of Windows Media Player), remove the line QUARTZ.INF.

If you use Windows 95 OSR2.5 or later, you'll also have to delete the following files from your installation directory:[1]

\Contents
CH*.*
IE*.*
AOL*.*
PRO*.*
ICW*.*
JAV*.*
ACTSETUP.CAB
AMOV4IE.CAB
AXA.CAB
CS3KIT.EXE
MAILNEWS.CAB
MOS.INF
MSCHAT2.CAB
MSINFO.INF
MSN251.EXE
NM21.CAB
NSIE4.CAB
OHARE.INF
PCVKIT.EXE
SWINST4.EXE
VDOLIVE.EXE

Installing Windows 98

In most regards, installing Windows 98 is a less complex affair than installing Windows 95. At the very least, it requires less preparation time. Since many more of the peripherals on the market today existed when Windows 98 was released than at the time of Windows 95's release, Windows 98 installation doesn't require nearly as much time and effort digging up device drivers and product updates.

Windows 98 also asks far fewer questions. This is an advantage when everything works the way it's supposed to. When things don't work as they should, Windows 98 presents some challenges.

In addition, Windows 98 presents the mother of all installation challenges: removal of the Internet Explorer 4.0 browser. Browser-agnostic people may not mind the Internet Explorer integration, but seeing Windows 98's performance with Internet Explorer removed could be enough to convince someone to switch to a Netscape or Opera browser.

The tricks presented at the end of the previous chapter for installing multiple copies of Windows and installing Windows to a RAM disk work for Windows 98 as well.

Why Not Install over My Existing Installation?

I'm pretty free about dispensing the advice to reinstall Windows. There are some people who suggest reinstalling every three months. I think this is extreme, but I expect a lot of people would benefit from reinstalling once a year. It doesn't take long for Windows to pick up a lot of baggage, and even if you're religious about running utility programs to keep your registry and system directories clean, there's only so much this can do to prevent the much-publicized "OS rot" that characterizes microcomputer operating systems like Windows 9x, Windows NT, and MacOS.

Unfortunately, when you install over an old installation, you inherit most of the problems the previous installation had, and sometimes you make them worse. The new installation will repair certain kinds of registry damage, but it is by no means a foolproof way to fix an ailing system.

If it's any consolation, a clean install followed by an uninstallation program's constant monitoring and regular use of a utilities suite should reduce, if not totally eliminate, the need for reinstallations on a regular basis.

Disaster Prevention

I've installed Windows 95 and 98 so many times I've lost count by now, and I've installed it on a lot of strange equipment, including computers that really had no business running Windows 9x. I've seen a lot of things go wrong. But Microsoft deserves very little of the blame, because most of these problems aren't bug-related. There are thousands upon thousands of so-called IBM-compatible or PC-compatible peripherals out there, most of which have never been tested for compatibility with one another. They should work, but that's mostly theory. In 1991, I heard an IBM engineer quip, "Even IBM computers aren't 100% IBM-compatible." He was right--it's impossible to make a computer that will work with every peripheral and every piece of software manufactured for IBM and IBM-compatible PCs. I hope that engineer didn't think the situation would get any better. The market is many times larger today than it was then.

You would have to be absolutely crazy to sit down at a working PC, reformat the hard drive, pop in the Windows 98 CD, and install from scratch. This approach usually works--eventually--but there are circumstances where a clean Windows installation, especially when very old or obscure hardware is involved, just won't work, and there's nothing you can do about it. If you have an installation that works, no matter how badly, you should preserve it. I'd venture to say this is unnecessary 99 times out of 100, but if your computer turns out to be that rare case that won't install, you don't want to be stranded without a working backup installation.

Before you do anything else, you want to have a boot floppy so you can restore the current bootable operating system to the PC. This is extremely important--if you're upgrading an old PC to Windows 98 and it fails, you won't be able to revert back to the working system without the boot floppy. Open a command prompt, insert the disk, then type the following commands:

FORMAT A: /Q /S 
This formats the disk and makes it bootable.
COPY C:\WINDOWS\COMMAND\SYS.* A:\      
This copies the SYS utility to the floppy--if your hard drive suddenly stops booting, 
the command SYS C: will make it bootable again.
COPY C:\WINDOWS\COMMAND\DELTREE.* A:\ 
This copies the DELTREE utility to the floppy. Deltree deletes files and 
directories the standard DOS DEL command won't.

Now, if you already have Windows installed on your computer and have a couple hundred MB of free disk space, you can save some time and effort by copying the \WIN98 subdirectory of the Windows 98 installation disk to your hard drive, then copying any device driver CDs you might have into subdirectories on your hard drive as well. This is cheap insurance: Windows 98 will sometimes install components that require access to the CD-ROM drive before it installs the device drivers that give it access to the CD-ROM, and this chicken-and-egg scenario can hang a Windows installation. This wasn't a big deal with Windows 95, since Windows 95 will install on a fast system in 15 minutes. Windows 98 usually takes much longer, however, and if you're like me, you don't want the 45-minute installation to hang 30 minutes into the process.

The traditional location to copy these files to is C:\Windows\Options\Cabs. We don't want to do that, because the current Windows directory is about to cease to exist (this is a clean installation, after all). So instead, copy them into C:\Win98, or if you want them to be in the traditional location, C:\Cabs.

Once you've copied the Windows CD and have a working boot disk, restart your computer in MS-DOS mode. Once there, we're going to rename the Windows directory. If something goes horribly wrong, we can very easily revert back to the old Windows installation with the boot disk, so long as we rename the old Windows directory rather than overwriting it. So type the following command to do the deed:

REN C:\WINDOWS C:\WINOLD

Now, if you want your Windows 98 installation files to be in the traditional location, type the following lines:

MD C:\WINDOWS
MD C:\WINDOWS\OPTIONS
C:\WINOLD\COMMAND\MOVE CABS C:\WINDOWS\OPTIONS

Finally, to commence Windows 98 setup, type the following lines:

CD \WINDOWS\OPTIONS\CABS
SETUP

Windows 98 setup will begin. As with Windows 95 installation, I suggest doing a custom installation, removing all of the optional components, getting Windows up and running, installing an uninstallation program like UnInstaller or CleanSweep, then going back into Control Panel ➝ Add/Remove Programs ➝ Windows Setup to add any optional components you want or need. You can then reinstall the rest of your software.

Installing Windows 98 Without
Internet Explorer

The possibility of installing Windows 98 without Internet Explorer was one of the main arguments in the Microsoft-U.S. Department of Justice antitrust trial. Department of Justice witness Edward Felten, a computer science professor from Princeton University, said he had written a program to do it, though Microsoft tried to demonstrate that the program didn't always do what its author said it did.

In the meantime, an Australian biologist named Shane Brooks, working on his own, figured out how to remove Internet Explorer 4. By replacing the Windows 98 shell with the older Windows 95 shell, he was able to achieve speed improvements of up to 35%. Brooks' program, which he calls 98lite, is available from www.98lite.net.

To run 98lite, you need to copy the \Win98 directory from your Windows 98 CD to your hard drive, then copy the files explorer.exe, shell32.dll, comdlg32.dll, wordpad.exe, and notepad.exe from either a Windows 95 CD or an existing Windows 95 installation into \Win98\98lite. Then copy the 98lite files 98lite.exe, 98option.exe, and 98logo.sys into the directory. To install, run 98lite.exe.

98lite gives you far more installation options than Microsoft's installation program. If you have the Norton Utilities, you have no need for MSInfo, so you can opt not to install it. ActiveMovie is obsolete and has been replaced by the new version of Microsoft Media Player, so you should opt not to install it. If you don't share your computer with anyone else, you can leave the Multiple Users option deselected. Your system will run faster if you don't install the Windows bitmaps (they consume precious directory entries in C:\Windows, after all). By default, 98lite moves all of the Internet Explorer-related directories to your system's temp directory. 98lite gives you the option to turn this off, but I recommend leaving the option on, because it reduces the amount of clutter in the directory, which speeds up your system.

After 98lite finishes generating setup files (a process that takes a few minutes, so be patient), it runs the standard Microsoft-provided Setup program. When Setup asks for a directory to install to, it will default to your old Windows directory. Type in a new directory name, because we don't want to upgrade. Fresh installations run much more quickly and tend to be more stable.

Always select the Custom installation and remove any components you don't use. I prefer to deselect all of the components, get Windows up and running, install an uninstallation program like UnInstaller or CleanSweep, then go back into Control Panel ➝ Add/Remove Programs ➝ Windows Setup to add any optional components I want or need. Once Windows and its optional components are installed, install the rest of your software.

Besides running faster, a Windows 98 installation using 98lite also has more lenient system requirements. Without the components 98lite removes, Windows 98 requires about 70 MB of disk space, a reduction of about 30 MB.

Issues with 98lite

There are some minor compatibility issues with 98lite. The best way to keep abreast of them is to visit the 98lite web site at www.98lite.net. Problems tend to be dealt with quickly as they are discovered.

Using the Registered Version of 98lite

The installation process is much easier with the registered version of 98lite than with the freeware version. You simply download the registered version, extract the archive, then run 98lite.exe. The program will ask for your Windows 98 CD if it can't find the installation cab files on your hard drive, then copy the installation files into a directory you specify. It asks what type of installation you want (the difference being varying degrees of Internet Explorer presence, ranging from none at all to full presence without integration), and it will ask for your Windows 95 CD if the installation type you chose requires it. It will then copy the Windows 95 versions of explorer.exe, shell32.dll, and comdlg32.dll to the installation directory. To install a new, clean, and slimmed-down version of Windows 98, exit to DOS mode, change to the directory into which 98lite copied its files, then run 98lite.exe. You will then be presented with a hacked version of Windows Setup that has considerably more options than Microsoft's version.

The most aggressive setting for 98lite Professional 2.0, which Shane Brooks calls 98micro, cuts the minimum space required by Windows 98 and 98SE down to about 50 MB. He also claims that 98micro runs approximately 15% faster than the unaltered Windows 98. This is a very reasonable claim, as 98micro has a much smaller installation footprint, a much smaller registry, and about 20% fewer files in its \Windows hierarchy. On some systems, the speed difference will be even greater.

Installing Windows 98SE Without Internet Explorer

The original freeware 98lite doesn't fully support Windows 98SE, which ships with Internet Explorer 5. However, 98lite Professional 2.0 works equally well with Windows 98 and Windows 98SE.

Removing Internet Explorer from an Existing Windows 98 Installation

Shane Brooks has also written a script to remove Internet Explorer from existing installations. This script, called IE-Remove, is also available from www.98lite.net. The script works well, and if you want to quickly give a Windows 98 PC a speed boost, this is a good way to do it. It's better to reinstall, but that's just not always practical.

Although Windows 98SE uses Internet Explorer 5.0 instead of version 4.0, the IE-Remove script appears to work with Windows 98SE as well.

Installing Device Drivers

If you copied your device drivers somewhere to your hard drive before installing (a practice I'm hesitant to recommend unless all of your peripherals have Windows 98-specific drivers), Windows may have found them and gone ahead and installed them. But if it didn't find them, chances are it didn't ask for them either. For example, after I install Windows 98, my network card just doesn't work. Windows 98 knows I have a network card, it knows it doesn't have a device driver for the card, but it didn't ask for one.

You can install most device drivers with the Add New Hardware Wizard after Windows is installed. To run the wizard, go to Control Panel ➝ Add New Hardware. Windows will present a list of devices it can see but lacks proper drivers to use. Highlight the device, click Next, then follow the special instructions (if any) in the documentation that came with the peripheral.

If the peripheral doesn't show up, consult the documentation for instructions on how to install it. If your system doesn't use an Intel chipset, there's also the possibility that Windows 98 won't add your motherboard's AGP and busmaster support. If your motherboard supports these functions, it will come with a disk or CD containing the appropriate device drivers. Be sure to install these drivers. Your system will be far faster and more stable with them installed.

Do Windows 95 Drivers Work with Windows 98?

Generally speaking, Windows 95 drivers will work with Windows 98. This makes sense, because Windows 95 and Windows 98 are both derived from the same kernel. Windows 98 isn't the evolutionary leap from its predecessors that Windows 95 was--it's very easy to trace the improvements from Windows 95 to Windows 95A to Windows 95B to Windows 95C to Windows 98. However, that's not to say there are no differences. The differences between Windows 95 and Windows 95B were significant enough that some peripherals had to ship with different driver sets for the two versions. The jump from Windows 95B to Windows 98 is bigger than the jump from Windows 95 to 95B. It's always best to look for Windows 98-specific drivers on your peripherals' installation disks and CDs, and if you find none there, check the manufacturer's web site.

Backward compatibility has always been one of Windows' goals, but sometimes it's just not possible. You shouldn't just blindly assume that the Windows 95 drivers will work perfectly with Windows 98.

Performing the Installation

Now that the setup files are appropriately modified to cut out some of the bloat, we're ready to proceed. Before you boot off the floppy you created earlier, run ScanDisk or a third-party disk repair tool from within Windows. You want your drive to be error-free when you install, and these tools do a better job than the DOS-based ScanDisk that Windows setup runs. After you finish checking your hard disk for errors, boot from the bootable floppy you created earlier. Now, issue the command:

REN C:\WINDOWS C:\WINOLD 

I never delete a working Windows installation until I manage to produce an installation that works better. If something goes horribly wrong and you just can't get the new installation to work right, you can always revert back to the old installation by deleting or renaming the failed installation and renaming the original installation back to its original state.

That said, I've only had a Windows 9x reinstallation go bad twice. Both times, it worked, but the machine was a whole lot more sluggish than it had been previously. I've installed Windows 95 hundreds of times, so it's pretty safe to say it installs cleanly and relatively easily most of the time. But one of my rules is to always have at least one more backup than I think I need. That way, if you turn out to be that one in two hundred that doesn't work right, you have a safe way out.

You might ask why we rename the Windows directory rather than installing on top of the existing installation. There are two reasons. First, if you install on top of what's there, you've lost your backup copy. It's much harder to revert back to your previous state if you install over an existing installation. Second, an installation over an existing installation inherits most of the characteristics, good and bad, of the existing installation. If MSN was installed on the existing installation (chances are it was), it will be in the new one. The only way to get a clean start is to start fresh.

Start the Windows 95 installation process by changing into your installation directory (I suggest C:\Win95 ) and typing SETUP. I usually feed Setup some command switches: SETUP /is /id /iq /d gives the kind of behavior I like (don't run ScanDisk, don't check free space, don't check for cross-linked files, and ignore whatever existing configuration files Setup or its spies happen to find). This gives me the fastest, cleanest install possible, assuming you ran a disk repair tool previously. Windows will ask if you accept the license agreement. Hope it hasn't changed since the last time you installed, say yes, then click Next.

Setup will default to upgrading the existing installation in C:\Winold. Click Other Directory, specify a different path (probably C:\Windows) and click Next. Setup will complain, saying that you'll lose whatever programs are installed in that configuration and you'll have to reinstall them. Tell it you don't care. This is, after all, precisely what we want. Sometimes it seems as if the easiest way to get a clean house is to build it from scratch, and that's definitely the case with computers (and that's true of Windows 9x PCs, Windows NT PCs, Macintoshes, and several other types of computers).

Setup will now present you with setup options: I always choose custom. And as for Microsoft's warning with this option, as far as I'm concerned, if you've gotten this far in this book, you qualify as an advanced user or system administrator. Setup will then ask if you want to look for all hardware devices. Usually you will want to say yes. If you have a very slow computer and know what's in it, say no and uncheck any equipment you know you don't have. If you have an IDE or SCSI CD-ROM drive (if your drive is faster than 2X it probably is), you can uncheck CD-ROM drive. If you don't have a laptop, uncheck PCMCIA. If you're not on a network, uncheck Network Adapter. If you don't have a SCSI card, uncheck SCSI controllers. If you feel like drilling deeper into the list, you can narrow it down even more.

What to Do if Setup Appears to Hang

On some Windows 95 systems, Windows will hang on installation no matter what you do. If this happens on your system, it's probably the hardware detection that's causing the problem. If this happens, uncheck any hardware devices you know you don't have. If that fails, you need extreme measures. Restart the installation and uncheck everything you don't have, as well as everything you think you might not have. All Windows 95 really needs in order to get through installation is the right keyboard and mouse drivers, along with generic VGA video. The right disk controller is nice to have (it significantly increases performance) but not absolutely essential. Go ahead and search for a standard IDE controller, because that's what most systems have. Once installation finishes successfully, you should be able to get the hardware configuration right by running the Add New Hardware wizard from Control Panel.

Hangs seem to be more common with Windows 98. On some systems, Setup will appear to hang as it prepares the Windows 98 Setup Wizard. It will reach 100% and just sit there. For example, Windows 98 tends to hesitate for about five to seven minutes on systems without floppy drives--it's waiting for the nonexistent floppy drive to respond. Other unusual configurations can cause similar delays. If the installation seems to be just sitting there, let it be. Run some errands or something while it sits.

A good test to see whether your system is truly hung or just taking a really long time is to hit the Caps Lock key. If the Caps Lock light on the keyboard won't light up, the system is hung. If the Caps Lock key will light up, there's hope. Give it some time.

If Setup does hang at this point (or at any other point in the installation for that matter), it could be that Setup doesn't like something about your hardware combination. You can still recover. Power down your computer, then open your case, remove any cards except for the video card, and try again, running installation with a bare system. More than likely it will install. After Windows finishes installing, shut down, turn your computer off, put the cards back in, and turn your computer back on. Windows should detect the cards one at a time and either add the device drivers or prompt you for the appropriate disks.

After searching for hardware, Windows will ask what components you want to install. I always clear all of the boxes. No, I don't actually use Windows in super-stripped-down econo-mode configuration. But it's much easier to optimize a minimalist configuration (there will be files you'll want to move to C:\Windows\Command ). Plus, Windows will never run any faster than it does in this minimalist configuration. It's good to see the system in this state in order to keep your performance goals realistic.

If Windows senses a network card or a modem, or if it has reason to believe you have one, it will ask you for a network configuration. Windows 95 is obsessed with networks. Resist the temptation to configure the network at this stage. Remove all of the components and set your Primary Network Logon to Windows Logon. Adding network components adds overhead, and at this stage we want the lowest overhead possible.

Click Next, and Windows will give you a configuration screen. The most interesting option here is buried at the very end. You can change from the Explorer-based Windows 95 interface to the Program Manager-based Windows 3.1 interface. If your system is short on memory, you might want to do this (and thus have ready-made Program Manager groups from the very start). Make whatever changes, if any, you might want, then hit Next. Windows will ask if you want a Startup disk. You probably don't; the disk you made earlier in this chapter will suffice for emergency use. Hit Next twice, and Windows will install files, then restart a couple of times, and you'll have a nice, minimalist, close-to-optimal Windows installation to work with.

Post-Installation Magic

Once Windows finishes its marathon of reboots, I close the Welcome screen (clearing the box that says Show on Startup), change the background color to black, and install an uninstallation program, followed by a utilities suite (or two). Then I run the uninstallation program, followed by the utilities suite. The more these programs know about my system, the better they work, and this is the earliest stage possible to introduce them. The first two things I do are optional. Technically, the uninstallation program and utilities suite are as well, but your system will run better if you go ahead and use them.

After optimizing the system by moving things around and installing any device drivers that Setup may have missed, I go ahead and configure the network (if need be) and install the optional components I want by going into Control Panel ➝ Add/Remove Programs ➝ Windows Components.

Once the optional components are in place, I go ahead and do another round of optimization (moving what I can from C:\Windows and C:\Windows\System into C:\Windows\Command, as described in Chapter 3).

At this stage, I suggest making a backup copy of your entire Windows configuration. The GPLed Info-ZIP is excellent for this. Download your copy of the DOS version of Info-ZIP's Zip and UnZip command-line utilities from www.cdrom.com/pub/infozip. You want the DOS version because you'll have to create your archives from DOS mode--Windows won't let Zip touch the registry while it's running. Copy the Zip and Unzip executables to C:\Windows\Command, then issue the following command:

Zip -9 -R -S [c:\windows.zip] c:\windows\*.*

You want to specify your own path, outside of the Windows directory, for your archive. You don't want something like that hanging out in your root directory. Once you have a backup, if you ever get into trouble, you can at least get back to this stage within a few minutes with the following commands:

COPY C:\WINDOWS\COMMAND\UNZIP.EXE C:\
CD\
DELTREE WINDOWS
MD WINDOWS
CD WINDOWS
UNZIP [C:\WINDOWS.ZIP]

Substitute the location of your archive in the last line.

Once I'm satisfied that I have a good backup, I install the rest of the programs I use.

Stupid Installation Tricks

Windows has more tricks up its sleeve. Although it's not exactly pretty, it's possible to have multiple copies of Windows installed on one PC--for instance, one tweaked out for games and another tweaked out for personal productivity--and if you don't mind occasionally shuffling a pair of floppies, you can run Windows 95 and 98 on the same system.

Installing Multiple Copies of Windows

The fewer programs you install, the faster Windows runs. But what about those programs that only get run every once in a while? Maybe you have a program you have to run once every month or two. Constantly installing and uninstalling it is a waste of time, but the program is wasting your time by occupying valuable directory space in your Windows directories.

The solution: install multiple copies of Windows. Microsoft didn't make it easy--they may have intended to make it impossible--but with a batch file for every configuration, you can do it. If more than one person uses your computer, you can set up a configuration for each person. Or you might have a configuration for typical everyday use and a stripped-down configuration (you know, no Office 97, no scanner stuff, not even a printer) for down-in-the-trenches gaming where every cycle counts.

To multiboot Windows, create a directory somewhere (say, C:\Windows\Command\Multiboot), then open a command prompt and type these commands:

ATTRIB -R -S -H C:\MSDOS.SYS 
This makes msdos.sys visible so we can manipulate it.
COPY C:\MSDOS.SYS C:\WINDOWS\COMMAND\MULTIBOOT\1.SYS 
This makes a copy of msdos.sys that we can swap in later.
COPY C:\AUTOEXEC.BAT  C:\WINDOWS\COMMAND\MULTIBOOT\1.BAT 
This makes a copy of autoexec.bat for future swapping.
COPY C:\CONFIG.SYS C:\WINDOWS\COMMAND\MULTIBOOT\1C.SYS 
This makes a copy of config.sys for future swapping.
ATTRIB +R +S +H C:\MSDOS.SYS 
This makes msdos.sys invisible again to make it more difficult to accidentally damage it.
EXIT 
This returns you to Windows.

Now install Windows. When it asks for a target directory, point it to a directory other than C:\Windows. Don't bother configuring it yet; let's just prove the concept before doing anything serious. Don't worry about losing your previous configuration, because we've archived it.

Once Windows is installed, open a command prompt and type these commands:

ATTRIB -R -S -H C:\MSDOS.SYS 
This makes msdos.sys visible so we can manipulate it.
COPY C:\MSDOS.SYS C:\WINDOWS\COMMAND\MULTIBOOT\2.SYS 
This makes a second msdos.sys we can swap with the old one.
COPY C:\AUTOEXEC.BAT  C:\WINDOWS\COMMAND\MULTIBOOT\2.BAT 
This does the same for autoexec.bat. 
COPY C:\CONFIG.SYS C:\WINDOWS\COMMAND\MULTIBOOT\2C.SYS 
and this the same for config.sys.
ATTRIB +R +S +H C:\MSDOS.SYS 
This makes msdos.sys invisible again to make it more difficult to accidentally damage it.
EXIT 
This returns you to Windows.

Now, open your favorite text editor and type in the two batch files shown in Example 10-1 and Example 10-2, saving the first one as C:\Windows\Command\Boot1.bat and the second one as C:\Windows\Command\Boot2.bat. These batch files automate the swapping process.

Example 10-1: Boot1.bat
DELTREE /Y C:\MSDOS.SYS
COPY C:\WINDOWS\COMMAND\MULTIBOOT\1.SYS C:\MSDOS.SYS
COPY C:\WINDOWS\COMMAND\MULTIBOOT\1C.SYS C:\CONFIG.SYS
COPY C:\WINDOWS\COMMAND\MULTIBOOT\1.BAT C:\AUTOEXEC.BAT
ATTRIB +R +S +H C:\MSDOS.SYS

 

Example 10-2: Boot2.bat
DELTREE /Y C:\MSDOS.SYS
COPY C:\WINDOWS\COMMAND\MULTIBOOT\2.SYS C:\MSDOS.SYS
COPY C:\WINDOWS\COMMAND\MULTIBOOT\2C.SYS C:\CONFIG.SYS
COPY C:\WINDOWS\COMMAND\MULTIBOOT\2.BAT C:\AUTOEXEC.BAT
ATTRIB +R +S +H C:\MSDOS.SYS

To boot the first copy of Windows, just go to Start ➝ Run ➝ BOOT1, then Start ➝ Shut down ➝ Restart the computer. Similarly, to boot the second copy, go to Start ➝ Run ➝ BOOT2, then Start ➝ Shut down ➝ Restart the computer.

If you look closely at the sequence of commands above and at the code in the batch files, you'll see that the only thing that changes is the numbers. You can have as many installations as you want (at least until you run out of disk space) by incrementing the numbers. When you save the batch files, you can give them more meaningful names as well, like Productivity.bat and Games.bat. The names don't matter.

Chances are there are some pieces of software you'll want to share between Windows installations. That's no problem. Just install the piece of software, then boot into another copy of Windows and install the piece of software in the same directory. Repeat as necessary. The application will then be available to multiple installations.

This technique would be especially useful in families with small children, since a large number of educational titles for children are very finicky. Many of those programs just don't work right unless you go into the System control panel, click on the Performance tab, hit the Graphics button, and slow down the system's hardware acceleration. This lets your educational titles run, but it kills the performance of your other applications. If you create a dedicated installation for educational titles, however, you can turn the hardware acceleration down in that installation, but leave it at maximum performance on your productivity installation.

You can also use this technique to solve DLL conflicts. Sometimes programs will install differing versions of DLLs--the subject of many a Brian Livingston column in InfoWorld over the past few years--and the application may crash the system if it finds a DLL it doesn't like. If you're having major problems with one or two programs on your system, try isolating one of them in its own copy of Windows to see if that clears up the problem.

There was a time when this technique was hopelessly wasteful, but with mainstream hard disk sizes doubling every year, we don't have to worry about that problem anymore. The disk space occupied by a 100 MB Windows directory currently costs about $1.20, and heaven knows what it will cost by the time you read this. Since it's easier to drop a bigger hard drive into a PC than it is to drop a new, more efficient file system into Windows, this presents a way to keep a large number of applications loaded on a PC without hopelessly slowing down the system.

Multi-Booting Windows 95 and 98

It would be nice if Windows 98 could use the above method to multi-boot with Windows 95 for the purpose of running games that aren't compatible with Windows 98. (Windows 98 has compatibility problems with Win-G, used by some older Windows 95 games such as Civilization II or This Means War.)

Unfortunately, if you back up Windows 95 as described in the previous chapter, then install Windows 98 and then point msdos.sys to the previous installation, Windows 95 hangs with the infamous Incorrect DOS Version error. Some hocus-pocus with setver.exe can get you past that, but then the even more infamous Out of Memory error gets you.

The easiest way to run Windows 95 and 98 on the same PC without a utility like System Commander is to keep a set of boot floppies. Boot Windows 95, then insert a blank floppy disk and open a command prompt. Enter the following lines (comments in italic follow each code line):

FORMAT A: /s 
This formats the floppy disk and installs system files.
ATTRIB -R -S -H C:\MSDOS.SYS 
This makes msdos.sys visible.
COPY C:\MSDOS.SYS A:\ 
This copies msdos.sys to the floppy.
ATTRIB +R +S +H C:\MSDOS.SYS 
This makes msdos.sys invisible again.
COPY C:\WINDOWS\COMMAND\SYS.COM A:\ 
This copies the SYS command to the floppy.
COPY C:\WINDOWS\COMMAND\DELTREE.EXE A:\ 
This copies the DELTREE command to the floppy.

Substitute the path to your Windows 95 directory in the last two lines.

Next, enter the batch file in Example 10-3, and save it to the disk as well.

Example 10-3: autoexec.bat
SYS C:
DELTREE C:\MSDOS.SYS
COPY A:\MSDOS.SYS C:\
ECHO Remove disk and restart to boot Windows 95.

After installing Windows 98 (to a different directory, of course), insert the second floppy disk, and repeat the process above, substituting the words "Windows 98" for the reference to Windows 95 in the last line of the batch file.

Keep the two disks in a safe place near your PC, and you can switch between Windows 95 and 98 by booting off the appropriate floppy disk.


1. From Sean Erwin's Windows 95 OSR2 FAQ at www.compuclinic.com/osr2faq.

Back to: Optimizing Windows for Games, Graphics and Multimedia


oreilly.com Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies | Privacy Policy

© 2001, O'Reilly & Associates, Inc.