George MacKerron: code blog

GIS, software development, and other snippets

Testing in Internet Explorer for VMWare Fusion users

You might have noticed that Microsoft has lately started making available time-limited Virtual PC images of Windows installations with (separately) Internet Explorer versions 6, 7 and 8.

This is brilliant for Mac users who need to test websites in IE, because you get a real installation of each browser in its home environment, with the right JavaScript engine and working conditional comments, plug-ins, Windows Media Player, and so on. With the alternatives, such as running under Wine or using Multiple IEs in a single Windows virtual machine, one or more of these things tends to be missing.

Unfortunately, the images are supplied as self-extracting .exe files, which of course are Windows programs. But happily, the Mac ports of Wine, the open-source Windows emulation software, can run them.

  • Get hold of the self-extracting archives from Microsoft. I find XP+IE6 and XP+IE8 a useful combination.
  • Install Darwine.
  • Open /Applications/Darwine/WineHelper, choose File > Open… and pick one of the .exe files you downloaded in the last step.
  • Ignore any Darwine messages about needing to install Mozilla, and click Next/Agree/etc. as necessary in the installer to extract the .vhd file. (I understand the free VirtualBox will take such a .vhd directly, but I’ve not tried this myself).
  • Download Q. This is a largely useless program for Intel Mac users, since its purpose is to emulate the CPU you already have. But bear with me: it includes a very handy utility.
  • Open /Applications/Utilities/Terminal, and paste in the following command, substituting in the correct path to your .vhd file and a path of your choice for the .vmdk file it will be converted to:
/Applications/ convert \
  -f vpc -O vmdk path_to_old.vhd path_to_new.vmdk
  • Nothing will appear to be happening for a few minutes, but don’t worry. Wait for the prompt to reappear.
  • Create a new Virtual Machine in Fusion, based on the new .vmdk you just created. Agree to Fusion’s request to convert the format of the disk.
  • Before starting up the new machine, remove its USB controller, sound card and serial port, and disable 3D graphics (this is all optional, but it reduces the number of requests for drivers you’ll have to deny later).
  • Start the virtual machine, canceling any requests for driver disks or Windows Update attempts.
  • Install VMWare Tools. I find everything works except the mouse, so at this point I choose the custom installation and deselect the mouse driver.
  • Reboot and you’re done.
  • Don’t forget to move the original .exe and .vhd files to the Trash: they’re big and completely useless now.


Written by George

May 28th, 2009 at 10:25 am

Posted in Mac,Web design