Using Windows 7’s “XP Mode” to run IE 6, IE 7 and IE8 side-by-side

Windows 7’s XP Mode is essentially a Windows XP virtual machine that runs in the new Windows 7 version of Virtual PC. This new edition of Virtual PC includes cool features such as seamless windows. The main reason I’m interested in this is to run older versions of Internet Explorer for testing purposes. IE8’s compatibility mode does a pretty good job of emulating IE7 but there are differences, so I investigated how to get “real” IE7 running under Windows 7’s XP Mode, without losing IE6.

Out of the box, the Virtual PC image is Windows XP SP3 with IE6. The trick to getting IE6 to appear as a seamless window like this is to launch the Virtual Windows XP virtual machine and in the VM, create a shortcut in the “All Users” Start Menu or desktop:

image

After a short delay, the shortcut will be duplicated into the Windows 7 host’s start menu:

image

When you launch this shortcut in Windows 7, the main Virtual PC window will close and the application will be launched and projected onto your desktop.

Creating a VM for IE7

You can’t install IE7 side-by-side with IE6 on the same machine, so to run IE7 at the same time as IE6 we will need to create a new VM. Unfortunately, if you run the VirtualWindowsXP.msi setup again you’ll get a message saying “Setup has detected that Virtual Windows XP is already installed”:

image

The workaround is to create a new instance of the VM manually using the supplied VHD as the base disk image. To do this do the following:

Open the Virtual Machines folder from the Start Menu and click Create virtual machine:

image

Specify a name and location for the virtual machine:

image

For memory I specified 256MB, which should me more than enough for just running IE7:

image

Here’s the important bit. Choose “Create a virtual hard disk using advanced options”

image

…and then choose a Differencing disk. This is the same way that the default Virtual Windows XP VM is set up:

image

If you want, you can change the default name and location (I didn’t bother):

For the parent virtual hard disk choose the original Virtual Windows XP virtual disk, which on my machine was at C:Program FilesVirtual Windows XPVirtual Windows XP.vhd:

image

Now start the new Virtual PC you just created from the Virtual Machines folder and complete Windows Setup as appropriate, choosing a computer name unique for your network and an Administrator password:

image

When that’s done:

  • Enable Integration Features from the Tools menu of the Virtual PC window
    • For credentials enter Administrator and the password you entered during setup.
    • I chose to Remember my credentials for convenience
  • download and install IE7 in the VM,

When IE7 has installed and rebooted, create a shortcut to IE7 in the “All Users” start menu which, after a short delay, will create a corresponding shortcut in the Windows 7 start menu of the host.

image

So here’s the end result, IE6, IE7 and IE8 all running on Windows 7:

image

Ahhh, 3 generations, all together – don’t they look adorable?

68 thoughts on “Using Windows 7’s “XP Mode” to run IE 6, IE 7 and IE8 side-by-side

  1. I installed Win7 RTM version Professional and unfortunately the procedure doesn’t seem to work there..

    The first steps are identical, but when I choose the “differencing disk” the next step is not “choose a parent virtual hard disk” but:
    “Choose a name and location for the virtual hard disk file” and that way there is no option to choose the existing vhd…

    Either there is a different in the way it works between Pro and Ultimate… or the procedure has been changed.

    What version did you work with RC or RTM ?

    Ashame this is one of the features I want to be using on a daily basis…

    Thanks for the Howto.. anyway.

      1. I managed to get the same result by making a copy of the vhd and creating a new Virtal Machine. I use a little more disk space that way, but it works.

  2. Good trick, but now I imagine you have 3 “computers” to take care of instead of just one. I’ve always just used XP (dual booted on top of Tiger, Leopard, and now Snow Leopard with Boot Camp and Parallels Desktop) and just upgraded / downgraded between 6, 7 and 8 whenever I needed to check for compatibility. My advice is it’s easier to just upgrade and downgrade the browser when you need it, than to have two more Windows operating systems continually update. Of course, you would need Windows XP in order to run IE6.

    1. How can upgrading and downgrading between 6,7 and 8 be better? specially if you need to test on these three versions simultaneously. You shouldn’t be worrying about updating your 3 “computers”, these 3 computers should only be used for testing.

    1. It might be stable, but it doesn’t render exactly the same way as full installs. I would be very leery about relying on this tool. It bit me on the ass quite a few times.

  3. Henk: carry on from where you were, once you choose the advanced options and differentiation disk, you repeat some options and *then* it provides you the source disk.

    Another tip: I couldn’t find the ‘source’ of the XP mode disk very easily, I think the new instructions from Microsoft lead you to create a differentiated disk to start with. So I went to the VMs folder, right-clicked on the XPmode disk, chose settings, and then looked at the second file location in under the hard-drive settings: its parent’s location.

    D. Estabrook: I’ve had problems with IE tester and JavaScript, where the rendering through it was nothing like IE6 in a virtual machine. I’m not sure the JS rendering is separated.

    Thanks for the how-to Duncan, I’ve bookmarked it as I’m sure I’ll need to point others here!

    1. Thanks for the tips, I had trouble with this as well. For reference, I found the base virtual hard disk here: C:\Program Files\Windows XP Mode\Windows XP Mode base.vhd

  4. Thank you… The secret was “All Users”… I tried in a bunch of places and the shortcut would simply not appear :p

  5. What if you don’t have W7 Pro or better? On XP and Vista, I was just able to create virtual machines for IE6/7 without XP Mode using Virtual PC, but the Microsoft website says it won’t work on W7. Is there a way to make this happen on W7 without XP Mode?

  6. I am getting a netbook with Windows starter. I will need to run IE6 for my Electronic Medical Record. WIll I need to upgrade to a full windows 7 to utilize this? I am a complete novice looking for some help prior to a purchase.

  7. THX for all these great tips here. It works excelent with IE6 but I have a problem with IE7. It’s because IE7 can’t be installed on Win XP SP3 and the XPMODE you can download from the MS Website has SP3 build in…

    So does anybody got a workarround for me?

    1. So I fixed the issue for myself… It’s a question of the language you try to install. I’ve mentioned a little detail on the MS download page. The German version (I tryed to install this one first) does only works with SP2. The english version supports SP2 & SP3

  8. I’m trying to do kind of the opposite – virtualise ie8 on xp. Does anyone know of any info about this – issues etc? Thanks

  9. I cannot start the original xp mode and newly created one at the same time 😦

    Not sure what I’m wrong

  10. I have the same problem as Thodsaphon: The error message reads:
    ‘XP IE7 encountered an error when attempting to use one of its virtual hard disks. One of the parent disks appears to have been modified without using the differencing hard disk.

  11. @Thodsaphon, @Bobby, @Author

    I think that when you base a new ‘virtual machine differencing disk’ on an existing ‘parent’ disk, the existing parent disk should be considered read only. If you modified it (basically already when you start it), it can go horribly wrong.

    from the MS documentation:

    “We recommend that you write-protect or lock the parent disk before using the differencing disk. Otherwise, if the parent disk is modified by some other process, all differencing disks related to it become invalid, and all data written to the differencing disks is lost. You also need to modify the virtual machine by replacing the parent disk with differencing disk, otherwise you will receive an error when you try to start the virtual machine because it cannot use a read-only disk.”

    http://technet.microsoft.com/en-us/library/cc720381%28WS.10%29.aspx

  12. If you are having problems with the differencing disk, you can get around it by either of the following options:

    a) Enable Undo disk on the XP Mode virtual machine

    b) Manually create 2 virtual machines using differencing disks based on the XP Mode virtual machine. Use one for IE6 and one for IE7, and dont use the XP Mode virtual machine.

    Either way the original disk will remain unchanged.

  13. Nice tip, but I have a question. When I close my IE6 or IE7 windows, my xp mode virtual machine is still running and I have to open my virtual machine folder to turn it off manually. Is it possible to turn it off when I close the browser windows?
    Thanks,
    Mauro

  14. Hi,

    Nice article. I am having one slight issue though. When it comes to logging in, I followed the install steps, and got my second version of xp up and running, however when I enabled integration features, I got a host machine logon box, asking for login credentials. I tried providing the credentials in the form of:

    Administrator
    ‘Password’

    XP_IE7\Administrator
    ‘Password’

    XP_IE7/Administrator
    ‘Password’

    Each time I get an XP’s login box rejecting the credentials and I know why – because the Windows 7 login box prepends the host machine’s domain (which is just my computer name) to the username, and this fails. I then have to remove both the domain, and XP_IE7 from the username within tthe XP login box (leaving just Administrator as the username), and it logs in fine.

    I don’t have this problem with the original XP mode VM, as this has the correct saved credentials. i just want to be in a situation where the VM will start and log in automatically particularly as I would like to run multiple IE’s for browser testing simultaneously without having to login to each VM every time.

    Any suggestions as to how to fix this would be awesome.

    Cheers,

    Alex.

      1. Hi Duncan,

        Thanks for the response, however, I have literally just managed to correct this issue, and thought I would share my resolution with everyone on here.

        To change the username that the host machine sends the VM when it starts up, I found out where windows stores this information, so I could edit it.

        In the VM’s setting’s (right click on VM, the click settings) this will show the various settings that you can change, and will also show you what credentials are stored against the VM.

        To change these, you need to navigate to Credentials Manager. Go to control panel on the host, and search for credentials manager. Under ‘Generic Credentials’ you will find the credentials that are stored for the VM’s on your box (if you have stored any credentials).

        Drop the arrow down to expand the relevant VM details, and then click on edit to change any of these fields.

        In my case, I just had to change the Username to Administrator, and the VM will now automatically logon.

        I can now login automatically, and now get all the IE’s up and running.

        Thanks again for the informative article.

        Alex.

  15. Thanks for this article Duncan. I wanted to test IE7 and IE8 and was tired of uninstalling one, then re-installing the other, but your article showed me, with clear instructions, how to install multiple virtual machines, each running a different version of IE. Thank you!

  16. Pingback: SolutionSet | Blog

Leave a comment