Run IE6, IE7, and IE8 on the Same Machine Using Windows 7 XP Mode Article

Craig Buckler
Craig Buckler

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.

Microsoft Windows Virtual PC and XP Mode

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.

Installing Virtual PC and XP Mode

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:

  1. 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.

  2. 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.

  3. 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.

Running XP Mode for the First Time

Your new XP VM can now be launched and configured.

  1. First, start XP Mode. To start XP Mode, choose Start > All Programs > Windows Virtual PC > Windows XP Mode. You’ll be prompted, as shown in Figure 1, “XPMUser account—remember your password!”, to enter the VM file location and a password for the XPMUser account—please keep the password safe!

    Figure 1. XPMUser account—remember your password!

    XPMUser account—remember your password!

    Click Next 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 Next 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”.

    Figure 2. A Fresh Windows XP Desktop

    A Fresh Windows XP Desktop

  2. 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.

  3. 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 VM menu, select Tools > Disable Integration Features. This will log you off XP and you’ll need to re-enter your password. Then, follow this procedure:

    1. From the XP Start menu, click Run, enter mmc, and click OK.

    2. From the console, choose File > Add/Remove Snap-in. Select Group Policy Object Editor from the list and click the Add button.

    3. A dialog box is displayed and Local Computer should be listed in the Group Policy Object field. Leave as is and click Finish, then Close, and finally OK.

    4. 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”.

    5. Click OK several times to navigate your way out and close the console.

    6. Right-click on the desktop, choose Properties; select Settings and apply an appropriate screen resolution, such as 1024×768 in 32-bit color.

    7. Finally, from the VM menu, click Tools > Enable Integration Features.

    Figure 3. Enabling 24-bit color

    Enabling 24-bit color

    The color depth will reduce to 24-bit, but it’s significantly better than 16-bit.

  4. 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 OK.

Go to page: 1 | 2