<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Windows</title>
  <link rel="alternate" type="text/html" href="http://pingv.com/tag/windows"/>
  <link rel="self" type="application/atom+xml" href="http://pingv.com/taxonomy/term/227/atom/feed"/>
  <id>http://pingv.com/taxonomy/term/227/atom/feed</id>
  <updated>2008-01-18T12:30:27-06:00</updated>
  <entry>
    <title>Browser testing with IE6</title>
    <link rel="alternate" type="text/html" href="http://pingv.com/blog/glhines/200712/browser-testing-ie6" />
    <id>http://pingv.com/blog/glhines/200712/browser-testing-ie6</id>
    <published>2007-12-19T15:15:46-06:00</published>
    <updated>2008-01-18T12:30:27-06:00</updated>
    <author>
      <name>GregHines</name>
    </author>
    <category term="browser testing" />
    <category term="Drupal" />
    <category term="host machine" />
    <category term="IE6" />
    <category term="networking" />
    <category term="theming" />
    <category term="virtual machine" />
    <category term="Virtual PC" />
    <category term="WAMP" />
    <category term="Windows" />
    <content type="html"><![CDATA[ <p>For various reasons I won't exposit now, I've formatted my laptop's hard drive and reinstalled Windows Vista. I need Internet Explorer 6 for browser testing theming work in <a href="http://drupal.org/">Drupal</a>, but Vista only includes <a href="http://blogs.msdn.com/ie/archive/2006/05/26/608255.aspx">IE7+</a>.</p>
<p>While I might have used <a href="http://tredosoft.com/Multiple_IE">Multiple IE</a> on a Windows&ndash;XP-based machine, it doesn't work on Vista. Additionally, while the Multiple IE's version of IE6 does a good job at approximating native IE6 rendering, it produces different results than native IE6 does. And when you're dealing with browser quirks, <em>close enough</em> isn't sufficient.</p>
<p>The solution is to use <a href="http://www.microsoft.com/virtualpc/">Virtual PC</a> run Windows XP, which includes a native install of IE6. Luckily, this is easy and free&mdash;Microsoft has released Virtual PC as a free download.</p>
<p>Microsoft has also thoughtfully released a <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&amp;DisplayLang=en">Virtual PC hard drive image</a> containing a stripped-down version of Windows XP; it includes IE6 and not much else. The current image will expire in April 2008, but Microsoft promises to release new images every six months.</p>
<p>The first step is to install and configure Virtual PC. Once running, I recommend going through the options (File &rarr; Options) and enabling Hardware Virtualization if your machine supports it. While this won't dramatically improve performance, it will make a difference.</p>
<p>Next, extract the "XP SP2 with IE6.vhd" file from the self-extracting archive and put it anywhere. I use the recommended folder of "~\Documents\My Virtual Machines" but if you're in a multi-user environment, you'll want to put it in a place accessible to all users. A warning, though: don't put the VHD on a network share&mdash;performance will be terrible if you do.</p>
<p>Back in Virtual PC, create a new virtual machine (File &rarr; New Virtual Machine Wizard). Give the virtual machine a name and choose "Windows XP" as the operating system. Change the RAM to at least 256MB rather than the default of 128MB. Choose to use an existing virtual hard disk and point it at the VHD file you extracted earlier. I recommend using Undo Disks in case you want to discard changes you make to the virtual machine on a per-instance basis.</p>
<p>Before continuing on with the Virtual PC setup, you'll need to adjust some network settings to your host machine (the physical machine running Virtual PC) so your virtual machine can view web pages running on your host machine.</p>
<p>Note: These instructions assume you're using Vista. The process is similar in XP, but how you locate the wizards will differ.</p>
<p>Open your Control Panel and type "Add Hardware" in the search box. Click on "Install drivers for older devices with Add Hardware wizard" to launch the Add Hardware Wizard.</p>
<p>Choose "Install the hardware that I manually select from a list (Advanced)" then choose "Network adapters" from the list. Choose "Microsoft" from the Manufacturer column and "Microsoft Loopback Adapter" from the Network Adapter column, then complete the installation.</p>
<p>Back at the Control Panel, type "Network Connections" in the search box and click on "View network connections." You should see the new loopback adapter (probably called "Local Area Connection 2" or something similar&mdash;you may want to rename this). You'll need to set an IP address to the adapter, so right-click on it and click "Properties." Double-click on "Internet Protocol Version 4 (TCP/IPv4)" then click on "Use the following IP address" and enter an IP address of 10.0.1.1 and a subnet mask of 255.0.0.0. Leave the default gateway and DNS servers blank. Click the "OK" buttons to save your changes to the adapter.</p>
<p>Now, go back to Virtual PC, highlight the virtual machine you created earlier and click on the "Settings" button. Highlight the "Networking" option and choose "2" or "3," depending on how many network adapters (including the new loopback adapter) you have in your host machine.</p>
<p>For "Adapter 1," choose the loopback adapter from the drop-down menu. Add your other network adapters in the other slots. By adding all of your network connections, the virtual machine will always have an Internet connection no matter how you're connected (wired or wireless).</p>
<p>Highlight the "Hardware Virtualization" option and enable the hardware-assisted virtualization if you can. The option you set before only allows this option to be set on a virtual machine, it doesn't enable it by default on all virtual machines. Click on the "OK" button to save the changes to the virtual machine.</p>
<p>Click on the "Start" button to run the virtual machine. Give it a few minutes to find all of your network connections, then open up the virtual machine's Control Panel, click on "Network and Internet Connections" then click on "Network Connections." You should see all of your network connections with less-than-descriptive names.</p>
<p>The "Local Area Connection" adapter should be your host machine's loopback adapter and you should rename it as such. Then right-click on the adapter and click on "Properties." Double-click on "Internet Protocol (TCP/IP)" then click on "Use the following IP address." Enter 10.0.1.254 for the IP address and 255.0.0.0 for the subnet mask. Leave the default gateway and DNS servers blank. Click the "OK" buttons to save your changes to the adapter.</p>
<p>Lastly, click on the "Start" button and click "Run..." and enter this command:</p>
<p><code>notepad.exe C:\WINDOWS\system32\drivers\etc\hosts</code></p>
<p>Click on the "OK" button and add the following line at the end of the file:</p>
<p><code>10.0.1.1&nbsp;&nbsp;&nbsp; vpchost</code></p>
<p>Save the file and close the window. Now you can load up an IE6 window and type <code>http://vpchost/</code> and it'll display what's running on your host machine.</p>
<p>Note to <a href="http://www.wampserver.com/en/">WampServer</a> users: you'll need to modify your httpd.conf file to allow requests from other computers. Find the &lt;Directory&gt; section and change the line that says "Allow from 127.0.0.1" to "Allow from all" and save the file then restart Apache.</p>
<p>And that's it. It's a fairly long process, but once it's been set up, you don't need to make any changes to it, regardless of what network adapter you're using to connect to the computer on the host machine.</p>
     ]]></content>
  </entry>
</feed>
