Microsoft recommends to use virtual machines to test IE 6/7/8/9. Download them here.
Here's what they say:
In order to help web designers and web developers test their websites in older versions of Internet Explorer, we've provided the following VHD with Windows set up with the specified version of Internet Explorer. The images are patched with the latest security updates and are otherwise clean installs of the operating system with very few modifications.
This download page contains different VPC images, depending on what you want to test. These images are specifically designed to run on Microsoft Virtual PC, and may or may not work in other hosting environments.
Due to the size of the Windows 7 and Windows Vista VHDs, it is split across several files, you'll need to download all files for that version of the Internet Explorer and uncompress them to the same directory to unpack the VHD file.
The password to login to all of these images is Password1 and the username will be present when you first login.
*Note: 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.