Saturday, September 29, 2007

21. Windows XP Installation Guide

From E.B.E.'s site

By: E.B.E.

1. Introduction


The idea of writing this guide came to me as a result of novices asking the same questions over and over again on this forum about various steps of the WinXP installation. I gathered quite an amount of experience by using and installing WinXP many times over the last four years, both on desktops and on notebooks. My record is keeping WinXP running on a desktop for almost three years, until it finally collapsed. And it ran quickly and smoothly until the last moment. I see no reason to keep that experience to myself.

I do not claim that the procedure given here is the best possible. It works for me; it incorporates many elements that I find useful. It incorporates elements that I learned as I needed them, elements which were tried by the test of time, passed it, and therefore can be trusted to really do their job. On the other hand, this might mean that very useful, neat and efficient things are not present -- simply because the need for them didn't arise and therefore I don't know about them. Some suggestions might even be outdated or plain wrong, although I don't think so. In brief, please, take everything with a grain of salt, and adapt the suggestions to suit your particular situation.

Contents and structure of this guide


I'm not going to give low-level "click here, click there, open that tab" instructions - that is beyond the scope of this guide. If you're uncertain about how to do perform some steps of the instructions -- google for more information, it is certainly out there. However, for tools or options which are hidden deep under tough-to-find keybord shortcuts, rightlick menus, tab hierarchies or executables, I do offer access routes. I do not cover dual-boot systems.

In several places information specific to ASUS notebooks is given. It might be useful to other notebook owners as well, but that's not guaranteed.

The document presents the installation steps (and more) chronologically, starting with pre-installation, going through the steps to install the OS, the drivers and essential software, addressing post-installation procedures, and ending with good maintenance habits.

2. Pre-installation: partitioning


This is for the users who have a fresh HDD (presumably from a new computer), or want to wipe their HDD as they install the OS. I presume it's superfluous to warn that this procedure destroys all data on the HDD.

The software I typically use for partitioning is PowerQuest Partition Magic; good alternatives exist, like qtParted in Linux, FDISK for DOS, or the incorporated partition utility from the Windows XP installation disk. In case the computer has no OS installed, PQMagic has a DOS version which can be started using by first booting from DOS-bootable media. qtParted can be started from a Linux live distribution, e.g., Knoppix. FDISK can be started using DOS-bootable media. Note that you cannot format partitions NTFS upon creation using qtParted or FDISK; that's no problem however, it can always be done afterwards. If the computer has a Windows OS installed, you can just install & run PQMagic.

How to partition the drive:
  • 15 to 25 GB System partition, depending on the size of the HDD and on what you want to install. If e.g., you plan to install several games on the system partition, you'll need quite a lot of space (perhaps even more than 25 GB depending on how many games you will keep installed at once).
  • 150% of RAM size Swap partition, for the Windows swapfile, pagefile.sys. For systems of 1GB or more, I run without a swap file; that's not too safe however, so use a swap file, and therefore create a swap partition.
  • Out of the rest of the HDD: 30 to 40% a Data partition, where data files like documents, kits, work files, downloads in progress etc. go, and the rest of 60 to 70% a Media partition, where image, music, and movie files go. Typically the Data partition will be more heavily used.

The System partition should be a primary partition, the other partitions can be created as logical partitions part of an extended partition. Format everything NTFS, or leave unformatted if you're using a utility which can't format NTFS.


3. OS Instalation


3.1. Using a clean bootable XP kit


Well, this part is simple: insert the CD and install WinXP. :) Make sure you have the CD as the first boot device in the BIOS, or on newer machines, bring up the boot device menu during POST and select the CD. If you didn't partition the HDD and want to do that, do it now, using the during-install partitioning software from the XP CD. Choose to install on the first partition, and format it to NTFS unless you already did that. Do a quick format, the full format rarely makes sense. Let the setup do its thing.

I usually customize the regional settings (timezone, date and time format etc) during installation, but it can be done afterwards as well, from Control Panel > Regional Settings.

Make sure you remember the password you choose for the Administrator account!

3.2. Using ASUS recovery disks


Boot from the first recovery CD, choose to recover on the first partition only, and let it do its thing. Insert the second CD (if applicable) when you're asked to do so. One important piece of information: if you wish a clean XP installation, do not insert the drivers CD when the install scripts require it. In that way, you will get a clean install, equivalent to what you would have obtained if you had been using a clean bootable XP kit.

4. Initial configuration of the OS


Configure the OS by taking the following steps: driver installation, user configuration,
UI customization, services setup, pagefile setup, and several other minor configuration steps. Possibly, the partitions might still need a bit of work at this stage.

Warning: Do not connect to a network until you make sure you are running a firewall! See below under Essential Software for suggestions about a firewall.

4.1. Partition work


If you wiped the HDD, and used a partition software which doesn't format NTFS such as qtParted or FDISK, now is the time to format all non-OS partitions to NTFS. You can do that from Computer Management > Disk Management. Right click the partition, and Format. Make sure you select NTFS and leave the cluster size to the default 4 KB.

Warning: Do not reformat the OS partition at this point, you'll lose the WinXP installation!

On ASUS notebooks: converting the OS partition to NTFS

Note: This step also applies to other installation procedures which create a FAT32 filesystem on the system partition.

ASUS recovery disks reformat the system partition to FAT32 while recovering the OS. Prior to converting to NTFS, the FAT32 partition must be aligned to 4KB boundaries, otherwise the conversion will create 512 bytes NTFS clusters, which leads to reduced performance.

As a first step, defragment the system partition using the Computer Management Console. To align the partition, use the BootIt Next Generation software. A trial version is freely downloadable. The trial version can be used to create an bootable ISO image which can then be burnt onto a CD. Boot from that CD and follow the instructions at http://www.aumha.org/win5/a/ntfscvt.php to align the FAT32 partition. On our fresh XP installation this shouldn't take more than half an hour. Then issue convert c: /fs:ntfs at a command prompt. The OS won't be able to convert while the OS is running since the system partition is locked, so hit Yes when it asks you to schedule the conversion upon the next restart, and then restart. The conversion will be performed when Windows boots the next time.

4.2. Driver installation


The drivers are the first thing to install on a fresh OS. You can use the driver CDs that came with the computer / hardware components, or you can go online and get the latest versions of the drivers. Although usually newer drivers are better, bug-fixed and sometimes give a significant performance boost, that is not always true. Sometimes newer drivers are a bit issuey and earlier ones more stable. If you decide on newer drivers, install them directly, don't install earlier versions first only to change them afterwards (unless the driver update works that way, as a patch). As to modded drivers, I recommend against them unless you know what you're doing.

I recommend the following sequence:
  1. Mainboard drivers (if any).
  2. Video card drivers.
  3. ACPI drivers and hotfixes (if applicable).
  4. Sound card drivers.
  5. LAN, WLAN, Bluetooth, etc., all the rest.

The order is somewhat arbitrary, however it's important to install mainboard drivers first, and ACPI (if applicable) sometime early on.

It's not really necessary that you restart after each driver installation, even though the setup programs will whine about it. To be on the safe side, restart twice: once after the essential drivers, up to and including sound card, and again after you've installed the rest of the batch.

4.3. User configuration


By default, WinXP creates during setup a user member of the Administrators group which logs on automatically. You enter the username yourself during the "Let's spend a few minutes setting up your computer" procedure which runs on the first Windows boot.
Security-wise, it's not a good idea to keep an Admin account with automatic logon. So, do the following:
  1. Logoff from that user account (it's probably what you're logged on as).
  2. Hit Ctrl+Alt+Del twice at the welcome screen and login as Administrator.
  3. Delete the automatic logon account from Local Users and Groups > Users in the Computer Management Console.

You might also want to enable the Guest account, to allow users to logon to the computer without a password. The problem is, guest privileges are poorly setup in all Windows versions, so from a default-setup guest account one can do pretty much everything one wants with the files on the computer (which is undesirable), but cannot install any software (which might sometimes be needed). I therefore deem the guest account of little use. There are other categories of users, like Power Users, normal Users etc., I have never used those -- try them out if you think they might help.

4.4. UI customization


These schematic instructions here are pretty much optional, as customizing the UI is a matter of each person's taste. I describe here the main elements of my setup.

Logon

I disable the welcome screen, it's too fancy for me. You can do that also, from Control Panel > User Accounts > Change the way users log on or off. Uncheck Use the Welcome screen.

Desktop

I hate the fanciful, cumbersome and bloated Windows XP UI look, so I always switch to Windows Classic. I remove all icons from the desktop except My Computer and My Network Places.

Taskbar and system tray

I like to know what's running on my computer, so under Taskbar Properties I disallow hiding of inactive icons and grouping of similar taskbar buttons.
To maximize taskbar space, I move the Quick Launch toolbar somewhere else (like along the top or left edge of the desktop), disable the language bar, and lock the taskbar.
If you have enough vertical space, it's a good idea to resize the taskbar (prior to locking) such that it accomodates two rows of task buttons instead of one. This also increases the space available to system tray icons.

Start menu

I use the classic start menu, with the advanced options set as follows:


State Option Observations
ON Display Administrative Tool Useful.
OFF Display Favorites Not needed unless you use IE.
ON Display Run Useful.
ON Enable Dragging and Dropping
ON Expand: Control Panel, My Pictures, Network Connections, Printers
Provides easy access to the respective elements.
OFF Scroll Programs Confusing if ON.
ON Show Small Icons in Start Menu Saves screen space.
OFF Use Personalized Menus Confusing if ON.


Using the Group Policy Editor, I remove from the start menu the My Documents and Documents options. I also force the Logoff button to be displayed.
Using Delete from the options' right-click menu, I strip the start menu to the basic items displayed in screenshot 1.

Error behavior

Error reporting: I disable it, it's annoying. Under System Properties > Advanced > Error Reporting, choose Disable (but Notify).

BSOD behavior: System Properties > Advanced > Startup and Recovery > Settings > System Failure.
Disable all three checkboxes, especially Automatically Restart. This way you'll be able to examine/write down the info on any BSOD (like the stop error code, faulty library etc.) to look it up later and use it in solving the problem.

4.5. Services setup


This is one of the important parts where you can optimize the OS. If properly done, services customization significantly reduces system load. Services have three startup options: Disabled (don't start at all), Automatic (start every time OS boots), and Manual (contrary to the name, start automatically but only when needed, not on every boot). Many services are by default set to Automatic, but they're needed rarely or not at all, so they consume resources needlessly.

Here follows the setup on my computer, a notebook on which I do pretty much everything: printing, scanning, downloading photos from cameras, connecting to wired and wireless networks, connecting to dialup. One important thing that I don't use is bluetooth devices. The message is: it's likely that my setup will be OK for you, since it doesn't disable any of the functionality mentioned above.

Don't follow these instructions indiscriminately, check the service descriptions and if you believe a service is needed, keep it. Conversely, if you think it's useless for you, disable it. If you believe it might be useless, but are unsure, switch it to Manual and stop it -- it will be started again by the OS upon need. If something that used to work doesn't work anymore after you finished setting up the services, go back and see if it can be blamed on some disabled service. Reenable it and try again. You can also google for service setup instructions, although you might find recommendations for minimalist setups that remove functionality which is actually needed.

Overall, I think my setup is a good starting point for most users out there.

You can customize services under Computer Management > Services. Here is my current setup. I tried removing the application-specific services (like the antivirus and firewall) to prevent confusion, but some might have been left over, so don't get alarmed if you see something here that's not on your list of services.


Service Startup Observations
Alerter Disabled Not useful.
Application Layer Gateway Service Manual
Application Management Manual
Automatic Updates Automatic
Background Intelligent Transfer Service Manual
ClipBook Disabled
COM+ Event System Manual
COM+ System Application Manual
Computer Browser Automatic
Cryptographic Services Manual
DCOM Server Process Launcher Automatic
DHCP Client Automatic
Distributed Link Tracking Client Disabled
Distributed Transaction Coordinator Manual
DNS Client Automatic Essential for connecting to a network.
Error Reporting Service Disabled Not needed.
Event Log Automatic
Fast User Switching Compatibility Disabled Needed if you want to switch between users without logging off.
FTP Publishing Automatic Not needed if you don't use the IIS FTP server on the machine.
Help and Support Manual
HID Input Service Automatic
HTTP SSL Manual
IIS Admin Automatic Not needed if you
don't use the IIS FTP or Web server.
IMAPI CD-Burning COM Service Manual Not needed if you don't have a CD/DVD burner.
Indexing Service Manual
Infrared Monitor Manual
IPSEC Services, Disabled Not needed unless you want to do fancy IP filtering, tunneling etc.
LightScribeService Direct Disc Labeling Service Automatic
Logical Disk Manager Automatic
Logical Disk Manager Administrative Service Manual
Messenger Disabled Not needed.
MS Software Shadow Copy Provider Manual
Net Logon Manual
NetMeeting Remote Desktop Sharing Manual
Network Connections Manual
Network DDE Disabled
Network DDE DSDM Disabled
Network Location Awareness (NLA) Manual
Network Provisioning Service Manual
NT LM Security Support Provider Manual
Office Source Engine Manual
Performance Logs and Alerts Manual
Plug and Play Automatic
Portable Media Serial Number Service Manual
Print Spooler Automatic Not needed if you don't print from the machine.
Protected Storage Automatic
QoS RSVP Manual
Remote Access Auto Connection Manager Manual
Remote Access Connection Manager Manual
Remote Desktop Help Session Manager Manual
Remote Procedure Call (RPC) Automatic
Remote Procedure Call (RPC) Locator Manual
Remote Registry Disabled Not needed unless you want to connect to the machine using remote desktop.
Removable Storage Manual
Routing and Remote Access Disabled
Secondary Logon Disabled Probably needed if you want to use user switching.
Security Accounts Manager Manual
Security Center Manual
Server Automatic
Shell Hardware Detection Automatic
Smart Card Manual
SSDP Discovery Service Manual
System Event Notification Automatic
System Restore Service Automatic
Task Scheduler Disabled Not needed, unless of course you use it.
TCP/IP NetBIOS Helper Automatic
Telephony Manual Needed if using a dialup connection.
Terminal Services Manual
Themes Disabled Needed if you don't use Windows Classic theme (i.e., no theme).
Uninterruptible Power Supply Manual
Universal Plug and Play Device Host Manual
Volume Shadow Copy Manual
WebClient Manual
Windows Audio Automatic
Windows Firewall/Internet Connection Sharing (ICS)Automatic
Windows Image Acquisition (WIA) Automatic
Windows Installer Manual
Windows Management Instrumentation Automatic
Windows Management Instrumentation Driver ExtensionsManual
Windows Time Disabled Useless.
Wireless Zero Configuration Automatic
WMI Performance Adapter Manual
Workstation Automatic
World Wide Web Publishing Automatic


4.6. Pagefile (swapfile) setup


Since we already created a swap partition, we're going to enforce that the pagefile takes up that entire partition, and nothing more. Prior to doing this, you might want to reallocate drive letters such that the swap partition is the last. Anyway, its use is going to be completely automatic so you won't want it to be in the way between your system and data partitions all the time.

You can change its drive letter from Computer Management > Disk Management. Assuming you have used my recommended partitions layout, you will have something like:
  • C: System
  • D: Swap
  • E: Data
  • F: Media

Use the following sequence to assign the Swap partition to drive letter F:
  1. Change Swap letter to an intermediary Y.
  2. Change Data letter to D.
  3. Change Media letter to E.
  4. Change Swap letter to F.

The pagefile configuration can be found under System Properties > Advanced > Performance > Settings > Advanced > Virtual Memory > Change. Select the swap partition, choose Custom Size, and set initial and the max to equal the size of the partition minus around 10 MB. Then select the system partition, and choose No paging file. Apply changes and optionally restart to let them take effect. Oherwise, restart sometime later (but do it before defragmenting under post-installation procedures below).

4.7. Disable Recycle Bin


I never use Recycle Bin. I'm responsible enough to know when I want to delete a file and when not. Files recycling can be disabled from Recycle Bin's properties. Furthermore, to remove the recycle bin icon from destkop, start the Group Policy Editor and activate the corresponding option in User Config > Administrative Templates > Desktop.

4.8. Miscellaneous setup


Driver signing

I disable driver signing to stop the OS from whining whenever it doesn't recognize a driver as signed by Microsoft. System Properties > Hardware > Driver Signing > Ignore and Make this action the system default.

Remove low disk space notification

This is going to be needed, since the swap partition is practically full, and the OS will keep complaining about it and annoying you in the process. To remove the notification, start RegEdit. Under HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer,
create a new DWORD value with the name NoLowDiskSpaceChecks, and set it to 1.

Disable removable media autoplay

Tired of stupid windows popping up every time you insert a CD or a flash drive, of you setting them to Take No Action, and of them buggily always forgetting your setting and popping up again the next time? Then do this: under Group Policy > Computer Configuration > Administrative Templates > System, enable Turn off autoplay for all drives (or only for CD drives, depending on what you wish).

Warning: This also disables autoplay for driver CDs etc., so you will need to start the autorun file manually every time.

Internet Information Services

If you want to host a FTP server on the machine, or want to develop and test webpages, the easiest way is to use the Internet Information Services built into XP Professional. You can do that from Control Panel > Add/Remove Programs > Add/Remove Windows Components. You will need the XP CD to copy the installation files.


5. Installing essential software


As essential software, I list: an antivirus and a firewall program, a file manager and a browser. I mean, Windows Explorer is a poor excuse for a file manager, and Internet Explorer... don't even get me started about that piece of crap.

Whatever antivirus and firewall you use, make sure they're lightweight. Don't install a bloated piece of software like Norton Antivirus; it will take half the system's resources to do the same things a 5MB utility will do.

Antivirus

I recommend Symantec Antivirus. It's free and lightweight. It's no longer supported or offered for download by Symantec, however it does its job very well, and virus definition updates still work without a hitch.

Firewall

Sygate Personal Firewall. As above, free and lightweight. As above, no longer supported.

If you aren't requiring too much from your firewall, you can use the one built into Windows. Sygate PF offers however more efficient control, like one-click disable/enable from the system tray, easy control of network access on a per application basis etc.

File manager

Total Commander. The best file manager for Windows out there. Not free, but has a fully functional shareware version. One important note if you use this: Under Options > Copy/Delete, choose Also use big file copy mode. This will greatly improve copying speed. Be sure however to include letters for CD/DVD drives, and removable flash sticks, under the Compatibility mode textbox. And be sure to tell the Commander correctly the division of your physical harddisks into drive letters.

Browser

Mozilla Firefox. Consider installing the following useful extensions:
CustomizeGoogle, MouseGestures, FasterFox, SmoothWheel, CookieSafe, DownloadStatusBar, UndoCloseTab.

5.1. On ASUS notebooks


Power management software might be helpful. ASUS Power4Gear is buggy and offers little control.
I recommend RMClock for undervolting / CPU frequency control. It's more lightweight than Notebook Hardware Control (NHC), more profesionally developed, and more focused on its task.

To monitor CPU and HDD temperatures / CPU frequency / battery charge and wear levels, use MobileMeter. Just a few kilobytes of executable, and it does its job well.

If you're a minimalist, have doubts about your knowledge on undervolting / controlling the CPU frequency, or simply doubt the correctness of the ACPI implementation on your system (like me), just use the Portable/Laptop power scheme under Windows Power Settings. Intel Speedstep will take care of the speed of your CPU just fine.

Be aware that some newer laptops (among the Core Duo line) have issues with older software like Everest / SpeedFan. Don't use such software unless you know exactly what you're doing. Don't overheat your notebook!


6. Post-installation steps


After you have completed the steps above, and you have installed all the software you regularly use (a media player, mail client, image viewer, music player, IM client are all in order I believe), follow these steps to finalize, cleanup and organize your WinXP installation.

6.1. Windows update


Soon enough, if you're connected to the internet, Automatic Updates will start downloading upates. Let it do that, it will take a while to download everything for the first time.

Do not install updates undiscriminately! E.g., if you never use Windows Media Player, Windows Messenger, or Outlook, it makes no sense to install updates for them. By indiscriminately installing updates, you'll only make your Windows installation bloated. It will become bloated enough without that, trust me.

Don't skip security updates, however.

Do install the latest Malicious Software Removal Tool! Not because it's useful -- if you've installed the antivirus and firewall, your system is not infected by anything. However, the moron programmers at Microsoft forgot to disable showing you older versions if you refused a newer one; this means that if you don't install the latest version, you will then be prompted about the earlier one, and then the one before that, and the one before that... There's a version for each month starting I think late 2004, so you'll have to click a lot of cancels if you skip the latest one.

6.2. Antivirus update


Update your antivirus to the latest definitions.

6.3. Moving data files from the OS partition


A lot of bad things can happen on a system partition. It's always better to keep your data somewhere else. If e.g., Windows breaks down at some point, or you simply decide to reinstall it, you don't have to worry about backups, you just format the system partition and get going.

E.g., if you're using some programming IDE, make sure it stores all the programs on the Data partition. I never store anything in My Documents, so I don't move that, but I think there exists a procedure to relocate it. Google for it. To relocate your Mozilla Firefox profile folder, such that you don't configure it / install extensions / save passwords every time you reinstall the OS, use this guide from the MozillaZine knowledge base. If you already have a profile folder somewhere else, just point to it using the guide.

6.4. The big cleanup


Yep. Here we go. There's a lot of stuff to clean up once the WinXP installation is complete.

Cleanup Windows components

This step is optional. It removes some Windows software that you'll never use, such as MSN Explorer.
Search in the Windows directory for a file named sysoc.inf. Open it. Search and remove all instances of the word "hide" (without quotes). Do not remove any commas. In the end, the file should contain lines of the form:

NtComponents=ntoc.dll,NtOcSetupProc,,4

Notice the two consecutive commas; that's where the "hide" was. Save and close the file. You have now enabled the display in Add/Remove Windows Components of several applications that were hidden.

Open Add/Remove Programs > Add/Remove Windows Components. Remove Windows Messenger, MSN Explorer.

Cleanup temporary files

These are found under \Documents and Settings\Administrator\Local Settings\Temp (assuming you've worked under the Administrator account), and \Windows\Temp. Delete everything from those folders.

Cleanup DLL cache and prefetch

Upon installation, the DLL cache will contain more than 500 MB of libraries. That is silly and unnecessary; not even a few tens of megabytes of libraries are going to be used on a regular basis. So, delete everything from the DLL cache folder: \Windows\system32\dllcache. It will have no noticeable impact on performance, and in a while, the OS will populate the directory with those few libraries that are really needed often.

The \Windows\prefetch folder contains information about applications which are to be partially loaded into memory upon booting the OS. At the end of the installation, a lot of junk will be present there, slowing down the OS boot. Delete everything from that folder. As above, in time the OS will populate the directory with prefetch data about applications it really needs. It's also possible to disable prefetch entirely (or allow it only for system files) but I don't recommend these options. Just leave the OS recreate the prefetch database, that should work fine.

Cleanup starting programs

Nowadays, almost all applications wish to put their "little" system tray application to start up by default when Windows starts, and forever take up resources without actually doing anything but annoying the user. The designers think, "oh well, it's just one app, what if the user absolutely needs to have our (essential, magnificent, central to the Universe) software one click away? and the process doesn't eat up that many resources, anyway." That is plain stupid, of course, since on a typical system many such applications will be installed, and many of them will be only rarely used. Not only system tray applications will start up automatically, but also hidden stuff like autoupdaters, removable media checkers and so on. Many unsavvy people do not know or do not care about turning these processes off -- and as a result, in half a year their system tray looks like a battlefield, with more than 10 or 15 icons colored in the most various shades populating it just after Windows boot. This boot takes just about 10 minutes, and then the system runs like crap.

The solution is simple: run the System Configuration Utility, and under the Startup tab disable anything that is not needed. Particular examples are (taken from my case):
  • Adobe Gamma Loader (from Adobe Reader).
  • NeroFilterCheck (from Nero).
  • SunJavaUpdateSched (from the Java Runtime Environment).
  • Bluetooth Manager (from the Bluetooth stack on my ASUS notebook).
  • Power_Gear (ASUS Power4Gear).
  • etc.

Any automatically starting updaters are typical candidates for disabling. Other than these examples, follow your common sense to remove anything that you believe is not needed. Take care though not to incapacitate your OS, antivirus or firewall.

Cleanup unused registry entries

Use a software like jv16PowerTools or RegCleaner.
Scan the registry and remove what isn't needed (with care though, otherwise you might remove something essential and the OS will malfunction). In jv16PowerTools, any registry entries which are marked as safe to remove are always really safe to remove.

Cleanup System Restore points

During the installation of all the drivers and software, many restore points were created. If your system is running fine (and it should, provided you didn't install doubtful drivers or applications), it makes no sense to keep restore points earlier than this final state of the OS, with all applications installed but still fresh.

The easiest way to cleanup the restore points is to disable/reenable system restore. Do that from System Properties > System Restore. Turn off System Restore on all drives, then reenable.

Additionally, it's a good idea to disable System Restore on all partitions except the OS partition. Since they contain only data (and the swap file, for the swap partition), it makes no sense to keep restore points on them. So, disable it. Leave it on only for the system partition.

6.5. Finalize UI customization


The UI setup is, as I've said once before, a matter of personal preference. However, I have some recommendations to make at this point.

Start menu organization

After you've finished installing the software, the start menu will be a huge, disorganized, flat collection of software folders. It's way more efficient to have them organized logically. In order to do that:
  • Put related applications in folders. E.g., media, web browsers and instant messenger(s), system tools, utilities.
  • Don't keep all the entries applications create upon installation. Uninstall entries are not needed -- applications can be uninstalled from Add/Remove Programs. Changelogs, support forums links, website links, shortcuts to help files in seven languages, all put in the Start Menu - useless, pointless, suffocating. Remove them.

Desktop organization

I don't like to have icons on my desktop. I like my wallpaper on my desktop. Therefore, I put shortcuts to often-used applications in an auto-hiding toolbar along the side of the screen. The shortcuts are, as with the start menu, organized into several major categories, e.g., system tools, media, programming/writing, dictionaries. See screenshot 2 for how my desktop looks.

6.6 Defragment the OS partition


Almost done now. One final thing to optimize performance. The OS installation creating files, the application installers copying files, removing temporary files, all left the system partition in a state of significant fragmentation.

Defragment it using Computer Management > Disk Defragmenter. It'll take a while, perhaps even more than an hour depending on how much software you have installed.

7. [Optional] Backing up the Windows XP installation


Note: This is an optional step, in no way necessary for a healthy Windows installation. It can save time on the next install, however.

So, now you have a complete, fresh, and optimized Windows XP installation. Many things can go wrong with an operating system over time, however: viruses or adware might make their way into the system files, driver installations can go bad and mess up the registry in a way that is impossible to repair, and so on -- God knows it's impossible to have a 100% reliable Windows installation. Of course, you can always take this guide and install Windows from scratch. This can however take a while, so if the problem arises unexpectedly you might find yourself in a situation where you lose a day of work to reinstall Windows (it happened twice to me already). That's not so pleasant, so here is a better solution:

Do a backup of the entire Windows installation, with the applications and configuration that you like! We are going to save the entire Windows partition in an image file, using the PartImage open-source software (there are alternatives, free as well as commercial). This is a guide on how to do that.
  • First, download an ISO of the SystemRescueCD, which includes the PartImage software, and write to a CD.
  • See how much of the Windows partition is occupied. The easiest way to do this is to right-click the partition in Windows Explorer. Then, make sure you have at least that much space on a different partition (actually when using GZIP compression, you are going to need approximately 60% of that space; but to be on the safe side just make enough space for all the data, unarchived). In order to minimize the required space, you can temporarily disable hibernation; that will save an amount of space equal to the amount of RAM in your system.
  • Make sure you do a cold, proper shutdown of Windows (not using Hibernate). Also make sure that the Windows partition is defragmented, and there are no system files on other partitions (like a swapfile). If you created a swap file on a different partition, temporarily disable it.
  • Boot from the CD.
  • Mount the destination partition of the image. Say it is the first logical partition part of the extended partition on the hard drive. This will be seen by Linux as /dev/hda5 -- because there can be 4 primary partitions, this is the first partition after those, so it's number 5; hda means the first hard drive in the system. Then you will need to issue:
    mkdir /mnt/backup
    mount /dev/hda5 /mnt/backup

    if the partition is FAT32, and:
    mkdir /mnt/backup
    ntfs-3g /dev/hda5 /mnt/backup

    if the partition is NTFS.
  • Start PartImage, by typing partimage at the command line.
  • Configure the backup process. The GUI of the program is self-explanatory. You will first need to select the partition to back up. This is most probably in a laptop /dev/hda1, i.e., the first primary partition on the single hard drive in the system (this might be different if you're dual booting with Linux or Vista, however). Then, you need to type a name for the destination image file. This should be under the mount point of the destination partition, so something like /mnt/backup/winxpimage. You also need to select a compression method; I recommend GZIP, or if you're really in a hurry, just choose no compression. If you believe you might want to write the image to DVDs in the future, it's a good idea to split it in chunks 4400 MB large (there is an option for that). Start the backup process, and go drink a coffee or something. In 10 to 25 minutes, depending on how much software you have installed, it will be done.
  • Finally, when the program is done, exit it, and type reboot at the command line. This will reboot you into Windows. Re-activate hibernation and, if such is the case, reconfigure the swap file properly, and you're done.

In the future, when you wish to restore the saved image to the partition, you need to:
  • Boot from the CD. Start the program.
  • Mount the partition with the image file(s) to the backup point (no need to use ntfs-3g even if the partition is NTFS, since you're not going to need write support).
  • Select the image and write it over the destination partition (probably the first partition). Warning: This will destroy all the data on the destination partition! Make sure you are writing on the intended partition (the first is /dev/hda1), or else you will destroy possibly important data on other partitions!
  • Stop the program and reboot.

Warning: Backing up NTFS partitions is currently experimental in PartImage. It is very likely to work, nevertheless. If it doesn't, you'll get an error, and then you need to use different software. Also: I have not yet tried restoring an image, so I can't guarantee the above steps will work for restoring. There is however no real reason for which they shouldn't. In any case, you might want to keep a Windows XP installation CD handy, to issue a fixmbr and fixboot from the Recovery Console, if your restored Windows is not booting.

One more thing: do not install all your games before doing the backup. Installing and configuring a game is not too troublesome or time-consuming, and it can be done again once you recover. Otherwise, you will waste a lot of space or DVDs for the system image.

8. Operating system maintenance


So, now you have a complete, fresh, and optimized Windows XP installation. To ensure it runs smoothly however, you need to perform continuing maintenance. Some essential elements are:

Periodic cleanup

Consists of repeating the cleanup steps described above:
  • Temp folders (in Windows and under the user profile), and Temporary Internet Files if you're using Internet Explorer (shame on you! :) oh ok, maybe you were testing some website you're writing). This should be done with a period of roughly one or two months.
  • System restore points: once every few months, if the OS is running smoothly, repeat the system restore cleanup step above. Otherwise, restore points will keep accumulating and eating up space needlessly. Even if you set a limit for the disk space occupied by System Restore, the OS won't respect it (surprised? you shouldn't be, it's typical for Windows, it happens with IE Temporary Internet Files as well).
  • Unused registry entries: roughly once every half a year.
  • DLL cache and prefetch folder: roughly once every half a year, but only if they become overpopulated.
  • Automatic startup. Check the list of starting applications every once in a while, and remove what's not needed.
    Whenever you install an application, make sure it doesn't add an unneeded automatically starting process.

Defragment

At least once every half a year. Not only on system partitions, data partitions benefit from it as well (not the swap partition though, that's a single big file, no sense trying to defragment there).

Software updates

Periodic updates of virus definitions (at least once every month) and windows updates (this latter will be automatic if you haven't disabled it).

Driver updates

Don't check the support website every day, but try to keep up with newer drivers, they might improve performance or stability. Don't install however undiscriminately, check the list of changes to see if you can really use the update. Also, if updates are posted often, don't install every one of them, keep a longer interval, you'll load the OS unnecessarily. Use Drivercleaner when updating video card drivers, it removes all driver files and registry entries very efficiently, and works for all major manufacturers of video cards.

Good software management practice

Don't bloat your OS by installing a billion applications. And, when you don't need a piece of software any longer, uninstall it. But don't overdo this, don't uninstall only to reinstall again, that's worse than keeping the software in the first place. Check Program Files for leftovers from uninstalled software, and delete them -- many programs leave files after being uninstalled.

Hibernation

I will say this here, although it's not directly related to maintenance. It's much more efficient to use hibernation instead of shutdown. Shutting down every time you need to power off the computes takes a lot of time. The ensuing "cold" OS boot also takes a lot of time. Hibernation is several times quicker in both steps. Hibernation can be enabled under Power Options > Hibernate > Enable hibernation.



Appendix


A.1. Accessing configuration utilities


  • Computer Management
    Right-click My Computer, choose Manage, or find it under
    Control Panel > Administrative Tools > Computer Management.
  • System Properties
    Hit the Windows Button + Break, or find it under Control Panel > System.
  • Group Policy Editor
    In the run box, type "gpedit.msc" without the quotes.
    Start menu and desktop configurations are under User Config > Administrative Templates.
  • System Configuration Utility
    In the run box, type "msconfig" without the quotes.
    Autostarting programs are under the Startup tab.
  • Registry Editor
    In the run box, type "regedit" without the quotes.
  • Start menu customization
    Right click taskbar, Properties > Start Menu > Customize.

A.2. Useful applications



A.2. List of acronyms


Non-obvious acronyms used in the document.
  • OS: Operating System.
  • UI: User Interface.
  • HDD: Hard Disk Drive.
  • WLAN: Wireless LAN.
  • BSOD: Blue Screen of Death, Windows stop error screen.
  • IIS: Internet Information Services.
  • IDE: Integrated Development Environment.
  • IE: Internet Explorer.