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

1
[HKLM\SOFTWARE\Microsoft\Internet Explorer\Version Vector]

, Internet Explore defaulted to respecting conditional comments based on the version number prebuilt in the program.