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 Files\Virtual Windows XP\Virtual 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?

About these ads

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

  1. Tommy says:

    Cool trick! :)

  2. Henk says:

    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.

    • Duncan Smart says:

      This was using the RC. I’ll take a look with RTM when I get my hands on it.

      • Henk says:

        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.

    • Dylan Harrington says:

      I can confirm that it worked as described for me on a 64bit Ultimate RTM install.

  3. iGuide says:

    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.

    • Daniel says:

      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.

  4. D. Estabrook says:

    So far, IETester seems to work very well and renderes IE 5.5 through 8 in a single app. This is the most stable app I’ve seen with multiple IE’s.

    http://www.my-debugbar.com/wiki/IETester/HomePage

    • matt says:

      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.

  5. AlastairC says:

    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!

    • stijndewitt says:

      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

  6. Red! says:

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

  7. nick says:

    What about IE add-ins? Flash, java, Activex etc

    i had issues getting them to work running virtually

  8. Marcus says:

    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?

  9. Doug Smith says:

    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.

  10. Doug Smith says:

    Thanks for the direction. Since the machine I plan to get has the Atom N280 and it appears on the list I suspect from a processor standpoint I will be ok. I also found the below listed link which you can put in the version of windows needed to run the XP Mode. Also requires professional edition of Windows 7. Thanks

    http://www.microsoft.com/windows/virtual-pc/download.aspx

  11. Jens Trinkies says:

    Thanks for the tip. Exactly what i was looking for.

  12. Wagner says:

    Cool tip, it’s working fine here, IE6 and IE7. Thank you for this post ;)

  13. Wagner says:

    Cool tip! It’s working fine for me with IE6 and IE7. Thank you for this post.

  14. Dirk says:

    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?

    • Dirk says:

      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

  15. Pingback: ie6 und Windows7 « Cyberer’s Weblog

  16. Carl says:

    Nice tip, thanks!

  17. Virgil says:

    Great stutf. blog.dotsmart.net deserves an award.

  18. Pingback: Windows 7 and legacy applications | Technology Blog

  19. Penny says:

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

  20. Thodsaphon says:

    I cannot start the original xp mode and newly created one at the same time :(

    Not sure what I’m wrong

  21. Bobby says:

    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.

  22. Thodsaphon says:

    Yes, exactly the same as Bobby

  23. Zidad says:

    @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

  24. Pingback: Digest for April 15th « The Robsons

  25. snickers says:

    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.

  26. Matt says:

    When I create a new VM, it creates a Windows 7 VM, not an XP VM… How do I create an XP VM?

  27. Lurex89 says:

    Nice! Very nyce! THANKS A LOT!

  28. Thanks for the tips. I wish i could use multiple IE apps but it doesn’t compatible with Win7

  29. yossi says:

    Thanks Duncan, this article was very helpful.

  30. Tyler says:

    Thanks!

    oh, and adorable my ass.

  31. Pingback: Oneda | Aconteceu no Twitter 43 - 14/11/10 a 20/11/10

  32. Chris says:

    Thanks so much! That works brilliantly.

  33. Parthasarathy K says:

    Hi

    Thanks so much! That works brilliantly.

  34. Pingback: Revision 14: Hashbangs, PhantomJS und Github-Gene | Working Draft

  35. Pingback: Working Draft Revision 14: Hashbangs, PhantomJS und Github-Gene • Peter Kröner, Webdesigner & Frontendentwickler

  36. Fabio Crudele says:

    tanks a lot! I’ve found the right solution to a little problem :)

  37. The holy grail at last. Bought you a sixer. Tip: the best beers are from California.

  38. guest says:

    is there any way to load site from localhost (apache in windows7) ?

  39. Karen says:

    Really clear instructions, worked perfectly. Thanks for taking the time to post the article.

  40. Mauro says:

    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

    • Duncan Smart says:

      Mauro, in my experience the XP VM hibernates eventually (no too long).

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

    • Duncan Smart says:

      Maybe Sysinternals AutoLogon will help: http://technet.microsoft.com/en-us/sysinternals/bb963905

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

      • Duncan Smart says:

        Glad to hear you sorted it out Alex.

  42. Shay N says:

    Thank you!
    Works wonderful….

  43. Pingback: Confluence: CONNECT FACTORY

  44. Pingback: Use in WIN7 install IE6 + XP Mode

  45. Pingback: In using XP install WIN7 Mode IE6 +

  46. BGK says:

    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!

  47. jdalbert says:

    Thanks a lot, excellent tip !

  48. Pingback: Accessing Localhost From Virtual PCs « Nobita

  49. Pingback: Using Windows 7’s “XP Mode” to run IE 6, IE 7 and IE8 side-by-side « Nobita

  50. Pingback: SolutionSet | Blog

Follow

Get every new post delivered to your Inbox.

Join 36 other followers

%d bloggers like this: