Over time, Windows loses stability. If you keep a computer for more than two years, at some point you're going to have to bite the bullet and reinstall Windows from scratch. But contrary to popular belief, you won't have to reformat your hard drive (with one exception, discussed below). The bad stuff you need to get rid of is all in your Windows folder.
Before you begin, gather your Windows and application CD-ROMs. Back up your data files (just to be safe), and then clear two days off your calendar. If everything goes smoothly, you can reinstall Windows in a few hours. But you have to assume something will go wrong: You may not be able to find a necessary CD, or data won't be where you thought it was, or something will simply refuse to work.
There's a difference between a repair reinstall and a complete reinstall. Though a repair (also called a refresh) will let you keep your current settings, a complete reinstall will give you a truly fresh version of Windows. Repairs are fast and easy, but they don't fix anywhere near as many problems. The instructions below are for total reinstalls, except where noted.
Your Vendor's Restore CD
Most computers ship with a vendor-specific restore CD rather than with a Microsoft Windows CD-ROM. (If your PC came with a Microsoft Windows CD, or if you bought a retail copy of Windows, skip to the section for your version.)
Some restore CDs give you all the options of a full Microsoft Windows CD, but with better instructions and the convenience of having all the right hardware drivers. Others can do nothing except reformat your hard drive and restore it to the condition it was in when you bought the PC. (This case is the exception I mentioned above that requires a reformat.)
If your restore CD is reformat-only, back up your data files to a network or a removable medium before reinstalling Windows. If you use Windows 98 or Me, back up C:\My Documents, plus the folders inside C:\Windows discussed in the 98/Me section below. If you have Windows 2000 or XP, back up C:\Documents and Settings. Also back up any other folders in which you store your data files.
Windows 98 and ME CDs
These Windows versions keep some important data inside your soon-to-be-erased Windows folder, so you need to copy several of its subfolders to another location. Right-click My Computer and select Explore. Double-click the C: drive icon (in Me, you may then have to click View the entire contents of this drive). Right-click in the right pane and select New, Folder. Name the new folder oldstuff.
Go to the Windows folder (you might have to click View the entire contents of this folder), hold down Ctrl, and select the following subfolders: All Users, Application Data, Desktop, Favorites, Local Settings, Profiles, SendTo, and Start Menu. If you don't see them all, select View, Folder Options (Tools, Folder Options in Me), click the View tab, select Show all files, and click OK. (If you still don't see them all, don't worry about it.) Press Ctrl and drag the folders to C:\oldstuff (see FIGURE 1).
Restart Windows with a start-up disk in your floppy drive. (To make a start-up floppy, insert a disk, select Start, Settings, Control Panel, double-click Add/Remove Programs, click Startup Disk, Create Disk, and follow the prompts.) At the Startup Menu, select Start computer with CD-ROM support. While the drivers load, insert your Windows CD-ROM.
Unless you're doing a repair reinstall, type the command c:\windows\command\deltree /y c:\windows and press Enter. Deleting your old files could take time, but the /y switch suppresses confirmation prompts, so take a break.
When you're back at the A: prompt, type x:setup, where x is your CD drive letter (it's likely one letter past what it usually is in Windows, so if it's D: in Windows, it's probably E: here). Press Enter and follow the prompts.
Once you're back in Windows, reinstall your graphics card driver. If you have Windows set up for more than one user, you'll also have to re-create each account. Select Start, Settings, Control Panel, Users to do so. It's important that the user names match those in the old installation. If you're not sure, open Windows Explorer and navigate to C:\oldstuff\profiles. There you'll find a folder for each registered user name (see FIGURE 2). Don't worry about passwords. Log off and log back on as each user. When you're done, log off and back on one more time, but instead of choosing a user name and a password, press Esc to enter Windows without being a specific user.
Select Start, Programs, MS-DOS Prompt (in Windows 98) or Start, Programs, Accessories, MS-DOS Prompt (in Windows Me). Type xcopy c:\oldstuff\*.* c:\windows /s /h /r /c and press Enter (if you want to know what the xcopy switches do, enter the command xcopy /?). When xcopy asks if it should overwrite a file, press a for All.
When xcopy is through, reboot and log on (as a particular user, if necessary). Open My Documents to make sure all your personal files are where they belong, including your Internet Explorer favorites and your custom Start menu shortcuts.
Now skip ahead to "Finishing the Job."
Windows 2000 and XP CDs
Boot your computer with your Windows CD-ROM inserted. When you get the 'Press any key to boot from CD' message, do so. (If you don't see that message before Windows starts, restart Windows, press the key you're prompted to enter for your PC Setup program, and change the boot order so your CD drive is first.)
At the 'Welcome to Setup' screen, press Enter. The R (repair) option takes you to the Recovery Module, which is useful if Windows won't boot, but it's no help with a reinstallation. Soon you'll be told that there's already a Windows installation on the computer. Press r for a repair reinstall or Esc to begin a complete, destructive one. For a complete restore, select your C: partition and press Enter. When you get the warning that says an operating system is on that partition, press c. When you are asked your partition preference, select Leave the current file system intact (no changes). When you're told that a Windows folder (or Winnt folder for Windows 2000) already exists, press l ('ell') to delete it and create a new one. Follow the series of prompts. When the installation program asks for your name, enter temp.
Once the installation is complete, your system will reboot into Windows, and you'll be logged on as user Temp. If the screen is difficult to read, reinstall your graphics card driver.
If you are reinstalling Windows XP, skip to "For Both Windows XP and 2000."
If you're reinstalling Windows 2000, log off as Temp and back on as Administrator. Now log off and on again, this time as Temp. Open Windows Explorer and navigate to C:\Documents and Settings. One of the subfolders will be named Administrator. Another will be named something like Administrator.computername.
Select Start, Programs, Accessories, Command Prompt. Type cd "\documents and settings" and press Enter. Then type xcopy administrator\*.* administrator.computername /s /h /r /c, replacing computername with the last part of that folder's name (after "Administrator.") in Documents and Settings. Now press Enter, and when you're asked about overwriting files or folders, press a for All.
If you have any users on the old installation besides Administrator, continue with the "For Both Windows XP and 2000" section. Otherwise, open Windows Explorer and make sure your data files are where they belong. Then go to Control Panel's Users and Passwords applet and delete the user Temp before skipping to "Finishing the Job."
For Both Windows XP and 2000
Reopen Windows Explorer. Select your C: drive (you may have to click Show the contents of this folder). Right-click in the right pane and select New, Folder. Name the new folder oldstuff. In the left pane, choose the Documents and Settings folder. It should have subfolders for each user from the previous install, plus one for Temp and a few others. Move the folders for your previous user names to oldstuff.
Select Start, Control Panel, User Accounts (Start, Settings, Control Panel, Users and Passwords in Windows 2000). Create an account for each user who was registered before the reinstall. Be sure to use the exact names. They are the same names as the folders you just moved to oldstuff (as shown in FIGURE 2). In Windows XP, at least one user must have administrator privileges.
Log off and back on as each user, before logging back on as Temp. Make sure that you select Log Off and not Switch User at Windows XP's Log Off dialog box (this isn't an issue in Win 2000).
Log on as Temp, select Start, Programs, Accessories, Command Prompt (in XP, Start, All Programs, Accessories, Command Prompt), type xcopy c:\oldstuff\*.* "c:\documents and settings" /s /h /r /c, and press Enter. Press a when asked if you want to overwrite a file. Log off Temp and log on to each restored account to make sure everyone's documents and data are where they belong. Log on as an administrator and run Control Panel's User Accounts applet again to remove the user Temp.
Finishing the Job
Now you've got Windows going, but not much else. You may have to reinstall your printer, sound card, and so on. Luckily, if a driver for the gadget came on your Windows or vendor restore CD, it was probably reinstalled automatically.
You'll have to reinstall your applications to reintroduce them to Windows. Some of their settings will not be changed by the reinstallation, but those that were stored in the Registry were wiped out.
Once your Internet connection is running again, browse to Windows Update and download all critical updates for your version (see FIGURE 3). Then visit the sites of your hardware vendors to update your drivers.
After the reinstall, some of your data may not show up where it should. Search for it in both your Application Data and oldstuff folders, and see if you can move it to the folder in which Windows or your apps are looking for it. If you find a folder called Identities with two subfolders whose names are long and indecipherable, try moving the contents of one to the other and see if your data reappears.
You've probably guessed that the final step is deleting the c:\oldstuff folder--and the Administrator folder in Windows 2000. Make this the very last step, however. Wait a couple of days, weeks, or even months until you're confident that all of your needed files are accessible.
Send your questions to firstname.lastname@example.org. We pay $50 for published items. Click here for more Answer Line columns. You'll find Contributing Editor Lincoln Spector's humorous writing at www.thelinkinspector.com.
More on Sudden Reboots
Reader Robert Mazzeo of Royersford, Pennsylvania, points out that the "Sudden Reboots" tip in my July column missed three common causes of sudden computer reboots. A bad power supply, a faulty video card or driver, and a failing RAM chip are often the source of these boots out of the blue. Also, if you follow the column's suggestion to use a can of compressed air to clean out your computer's insides, wait at least 2 hours before turning your system back on.