Monday, April 21, 2014

Installation Guide for Internet Explorer VPC image on Virtual PC

Different versions of Internet Explorer (IE) have presented challenges for testing the Web application. In order to test on multiple browsers concurrently, Microsoft has kindly provided free downloadable disk images for IE 7, 8, 9, which could be run under their Virtual PC software, so that you could test all browsers under the virtual machine.

This post is a step-by-step guide on how to set up the VPC images for IE 7, 8, 9. In particular, the following versions of IE are available in Windows virtual machines.
  • IE7 in Windows Vista – The install files for IE8 and IE9 are also available for install in this virtual machine.
  • IE8 in Windows 7 with install files for IE9 – The install files for IE9 are also available for install in this virtual machine.
  • IE9 in Windows 7

Step by Step Installation Guide:


Prerequisite:
1. Download Virtual PC here.
2. Download VPC images here.

Steps:

To install Virtual PC, double-click on the .msu file you downloaded.


 A confirmation dialog box displays. Click Yes to install the update.



Read through the license terms and click I Accept to continue with the installation.


The progress of the installation displays.


When the installation of the update is finished, the following dialog box displays. To restart your PC immediately, click Restart Now. If you want to make sure everything is closed before restarting, click Close. However, be sure to restart your PC before using Virtual PC.




To expand an IE virtual machine, double-click on the .exe file, which is the first part of the compressed files. For this example, we are going to extract the IE8 Windows 7 virtual machine and import it into Virtual PC.


If the Open File – Security Warning dialog box displays, click Run to continue with the installation.



Read through the License Agreement and click Accept to continue extracting the virtual machine files.


The WinRAR self-extracting archive dialog box displays. Either accept the default location for the Destination folder, which should be the current location of the compressed files, or click Browse to select a different location for the resulting virtual machine files. We accepted the default location. Click Install.


The installation progress displays.


When the files have been extracted, you will see a .vhd file, which is the virtual machine hard drive, and a .vmc file which contains the settings for the virtual machine.


To open Virtual PC, select Windows Virtual PC from the Windows Virtual PC folder on the Start menu.


A Windows Explorer window opens to the location of the Virtual Machines, if any existed. Click the Create virtual machine button on the toolbar. If you can’t see the button, click the double right-pointing arrow button and select Create virtual machine from the drop-down menu.



The Create a virtual machine wizard displays. Enter a name for the virtual machine in the Name edit box. Accept the default Location for the virtual machine file. It will be placed in the Virtual Machines folder that opened in the Windows Explorer window when you started Virtual PC. Click Next.


The Specify memory and networking options screen displays. Enter the amount of RAM, in megabytes, you want the virtual machine to use in the edit box. To connect the virtual machine to your network, select the Use computer network connections check box. You will most likely need to turn on this option so your virtual machine can access the internet through your network.



On the Add a virtual hard disk screen, select the Use an existing virtual hard disk radio button, and click Browse.


On the Select virtual hard disk dialog box, navigate to the folder where you extracted the .vhd and .vmc virtual machine files. Select the .vhd file and click Open.


Select the Enable Undo Disks check box.

NOTE: The Enable Undo Disks option allows you to return to the initial settings that exist when you first set up the virtual machine in Virtual PC. This is helpful because the versions of Windows in these virtual machines are not activated. They are essentially in trial mode. From the Microsoft site:

“You may be required to activate the OS as the product key has been deactivated. This is the expected behavior. The VHDs will not pass genuine validation. Immediately after you start the Windows 7 or Windows Vista images they will request to be activated. You can cancel the request and it will login to the desktop. You can activate up to two “rearms” (type slmgr –rearm at the command prompt) which will extend the trial for another 30 days each time OR simply shutdown the VPC image and discard the changes you’ve made from undo disks to reset the image back to its initial state. By doing either of these methods, you can technically have a base image which never expires although you will never be able to permanently save any changes on these images for longer than 90 days.”

We will explain later in this article how to undo changes and reset the virtual machine to the initial settings.

Click Create.


You should see a .vmcx file in the Virtual Machines folder in the Explorer window that opened when you started Virtual PC.


To open the virtual machine, select the .vmcx file and then click the arrow button next to the Open button that becomes available. Select Windows Virtual PC from the drop-down menu.


Two users display on the virtual machine screen during boot up. Each virtual machine has two users, but only one seems to work. Choose the following usernames for each of the virtual machines:

IE7 in Windows Vista: Administrator
IE8 in Windows 7: IEUser
IE9 in Windows 7: Administrator


Use the password “Password1” (without the quotes) for each of the virtual machines to log in to Windows.




The Windows Activation dialog box displays saying that the activation period has expired. Click Cancel in the lower, right corner of the dialog box.



The Microsoft Security Essentials dialog box may display. Click Close.


Once Windows has started in the virtual machine, click the Internet Explorer icon on the Taskbar to open IE.




IE opens. You can set your default home page and view any web pages you need to test in this version of IE.


You can check the version by selecting About Internet Explorer from the Help menu.



To close the virtual machine, select Close from the Action menu.


In the Windows Virtual PC dialog box, select Shut down from the drop-down list. If you want Shut down to be the default option, select the Make it the default and don’t show this message again check box. Click OK.



You can change the settings for a virtual machine once it is shut down. To do so, select the .vmcx file for the virtual machine you want to change. Click Settings on the toolbar in Explorer.




If you are getting to end of your 30-day trial period in your Windows virtual machine, you can reset the virtual machine to the initial settings, therefore resetting the trial period. To do so, select Undo Disks in the list on the left of the Windows Virtual PC Settings dialog box. Make sure the Enable Undo Disks check box is selected and then click Discard changes.



A warning dialog box displays. To continue resetting the virtual machine settings, click Continue. Remember that any changes you made to the Windows system in your virtual machine will be lost.


You are returned to the Settings dialog box. Click OK to close it.



You can install IE8 or IE9 in the IE7 virtual machine. There are icons on the desktop to easily install either version. Remember, however, that installing IE8 or IE9 replaces IE7.


In the IE8 virtual machine, you’ll find the file to install IE9 in the C:\Internet Explorer Versions directory.


Once you have opened the virtual machine once, the login process is a little different. The following dialog box displays the next time you open the virtual machine.



Click IEUser and enter “Password1” in the edit box. Click OK.


A dialog box displays while the integration features of the virtual machine are enabled.



The virtual machine opens and you can run IE.


Side Note:
1. Be warned that the Windows 7 and Vista VHD files are large and are split across several files. Download all the files for each virtual machine for the versions of IE you want to run. We will show you how to unpack these files so they create the complete VHD file. You will also need to download Microsoft Virtual PC, which is actually an update to Windows. The download links for the virtual machines and Virtual PC are at the end of this article. To download Virtual PC, you must validate Windows. The download links are at the end of this article.

2. If you install a later version of IE in one of the virtual machines, it replaces the earlier version. If you need to run all three versions, create a virtual machine for each version.

3 comments:

  1. This is a wonderful guide.
    How would I run off the web server running on my same machine, but outside of the virtual PC environment. Would I have to use Charles?

    ReplyDelete
  2. Hello There !
    Be careful for french users for example, you have to type the password as if you get a QWERTY keyboard !
    It bugs me a few minutes...

    ReplyDelete
  3. This was of extreme help to me, to resolve an issue at work. Thanks a lot!

    ReplyDelete