Testing your lovingly crafted web application in Internet Explorer is
so much harder than it should be. IE6, IE7, and IE8 all have a healthy
market share, yet it’s impossible to test all three versions on a single
Windows OS. There are some clever hacks and nifty software, but all are
flawed and few run well on Windows Vista or 7. The most reliable testing
method is to use three separate PCs.
Few of us have the room or patience to maintain three PCs, so we
resort to Virtual Machine software such as VMware or VirtualBox. VM software emulates a
PC (the guest) on your real PC (the host). Assuming VM software is available
for your host operating system, you can run any other OS within a VM. In
most cases, a VM is just a file containing a hard disk image. Therefore, VMs
can be backed up, cloned, or moved far easier than a real PC.
Virtual PC is Microsoft’s alternative to VMware and VirtualBox. It’s
available as a free download for most versions of Windows. As a standalone
product, it’s functional but offers fewer facilities than the competition.
However, XP Mode is Virtual PC’s killer feature. It provides:
a fully licensed, stripped-down, virtual copy of Windows XP
SP3.a clever facility which integrates the guest Windows XP OS with
your Windows 7 host. In effect, you can run XP applications as if they
were native Windows 7 programs. Although the XP application is
isolated, it can still access the host’s files and systems.
This benefit to web developers is obvious: you can run
real versions of IE6, IE7, and IE8 on the same
desktop at the same time without any conflicts.
Before going any further, you should check which version of Windows
you’re running:
Windows 7 Professional, Enterprise, and Ultimate users can
install Virtual PC and XP Mode.Windows 7 Home users can install Virtual PC, but you’ll need
your own XP installation disks, and you’ll be without the benefits of
XP Mode integration.Windows Vista and XP users can install the older Virtual
PC 2007.
If your system lacks support XP Mode, I would recommend VirtualBox rather than Virtual
PC. It’s free (open source), faster, and offers more facilities. Assuming
you’re still here (and not off installing VirtualBox), follow the steps
below to install Virtual PC and XP Mode:
First, check your PC’s compatibility. To run XP Mode
effectively, I’d recommend at least 2GB of RAM. It’ll probably work
with less, but it will be more of a chore to use. XP Mode requires
hardware-assisted virtualization (HAV). This is supported by most
modern processors, but it may need to be enabled in your BIOS. The
BIOS menu is normally accessed by pressing Del,
F2, or Esc immediately after
switching on your PC. Microsoft also provide a useful HAV detection
tool which can help you with BIOS configuration.Next, download XP Mode and Virtual PC. The downloads are
available from the Microsoft
Virtual PC page. After selecting your Windows 7 OS version and
language, you’ll be presented with two download links:Windows XP Mode
Windows Virtual PC
Download and virus-scan both files before proceeding to the next
step.You must install XP Mode first! I realize
this seems a little odd, but it’s what you need to do. Once it’s
complete, install Virtual PC and reboot your PC.
Your new XP VM can now be launched and configured.
First, start XP Mode. To start XP Mode, choose
>
> >
. You’ll be prompted, as
shown in Figure 1, “XPMUser account—remember your password!”, to enter the VM file location
and a password for theXPMUser
account—please keep the password safe!Click and you’ll be asked whether
automatic updates should be enabled or disabled. I’d recommend
disabling updates—you’ll have no need to automatically upgrade IE6
just yet. Click again and the XP Mode
guest OS will install. After a few minutes, you’ll be presented with
the fresh Windows XP screen you can see in Figure 2, “A Fresh Windows XP Desktop”.You should now install the latest updates, but be very
careful to avoid installing IE7 or IE8! You could also
remove any unnecessary Windows components, such as Games, Media
Player, MSN Messenger, and so on from the Add/Remove Windows
Components panel in the Add or Remove
Programs control panel.Next, you need to configure the VM resolution. The XP Mode VM
runs at an unusual 960×600 resolution with 16-bit color. Unless it’s
changed, IE6 and IE7 will also run in 16-bit color mode and your
subtly shaded web application will look a bit strange. Changing the
resolution and color depth is a little unusual because XP Mode uses
Windows Remote Desktop. From the menu, select
> . This will log you off XP and you’ll need to
re-enter your password. Then, follow this procedure:From the XP menu, click
, entermmc,
and click .From the console, choose >
. Select
from the list
and click the button.A dialog box is displayed and
Local Computershould be listed in the Group Policy
Object field. Leave as is and click
, then
, and finally
.Navigate to Local Computer Policy >
Computer Configuration >
Administrative Templates >
Windows Components > Terminal
Services, then double-click the Limit Maximum
Color Depth setting. Choose
Enabled and set Color
Depth to 24-bit, as shown in Figure 3, “Enabling 24-bit color”.Click several times to navigate
your way out and close the console.Right-click on the desktop, choose
; select
Settings and apply an appropriate screen
resolution, such as 1024×768 in 32-bit color.Finally, from the menu, click
> .
The color depth will reduce to 24-bit, but it’s significantly
better than 16-bit.Once you’re done, it’s important to fully shut down the guest XP
OS—click the window close button, choose Shut
down, then click .







