Conditional Commenting Using Multiple IE on VMWare

As most web developers know, testing for Internet Explorer is a necessary evil that comes with the job. Fortunately a few tools has made the process easy:

1. VMWare to run Windows XP with (and Vista if necessary; but yuck!);
2. Multiple IE app;
3. Conditional commenting using alternate stylesheets if push comes to shove (coding to standards is easy for all other browsers but IE; this is when you don’t want to alter your “standardized” stylesheet just for IE fixes; kudos to Microsoft for making this possible);

But #3 failed me today, and I had to find out why the hard way — Internet Explorers installed via Multiple IE will always default to the latest version of the IE installed (credit). Meaning, if you have IE6 and IE7 installed, even IE6 will always declare itself as IE7 when it comes to conditional comments (but not in browser agent, thankfully). After applying the simple registry hack (oh, the good old Windows registry, you…) and a quick reboot, everything worked as expected.

Here’s the hack (in case the link provided above disappears for some reason):

… by removing the “IE” key in the registry subkey [HKLM\SOFTWARE\Microsoft\Internet Explorer\Version Vector], Internet Explore defaulted to respecting conditional comments based on the version number prebuilt in the program.

One Response to “Conditional Commenting Using Multiple IE on VMWare”

  1. Adam Lang Says:

    Seriously, you are my savior. You would not believe the frustration I’ve just gone through, trying to figure out why in the world my multiple IE installations worked perfectly fine on my WinXP HP laptop, but not on my WinXP VMWare machine on OS X. As far as I was aware, the VM was just that, a virtual machine. Yet they fail to inform you on the Multiple IE site that if you’re using it on VMWare, this additional step is required.

    Thank you so very very much for making me a happy man once again.

Leave a Reply

Comment Preview