Update, May 17, 2016: With Windows 10, and maybe Windows 8/8.1 as well, you don’t need to jump through these hoops. Just move or clone a drive to your new system and boot it up. Windows detects that it has been moved and does a new device scan. If your new system needs a disk controller driver that is not built into Windows (i.e. some kind of RAID device), you’ll want to make sure that the driver is installed before the move.
Windows usually isn’t very happy when you try to move it to a different PC. If you were to take the hard drive out of one PC, install it in a different PC, and try to boot it up, unless the system components were identical or very similar, you would probably be presented with a BSOD right after the boot begins.
There are a few different ways to prepare your Windows installation to be moved to a different machine. One way is to use Sysprep to generalize your installation. This will make it forget about a lot of the hardware-specific information that it has and allow it to be booted on different hardware. The downside is that it loses a lot of your personalizations.
I’m writing about the in-place upgrade method because I didn’t find another article explaining it in detail. This method isn’t necessarily better than the Sysprep method, but it will keep all of your settings and programs. You will lose some installed Windows updates, which you will have to install again after the switch is complete.
This method actually works with any version of Windows since Windows 2000. This of course includes Windows 2000, Windows XP, Windows Vista, and Windows 7. I believe that this should also work with Windows 8 but I have not tried it yet.
To pull this off, you’ll need the Windows installation media for the version of Windows that you are using. Additionally, Windows Vista and Windows 7 require that the service pack level of the installation media match the service pack level of your running installation. For instance, if you installed Windows Vista with an RTM disc (from before Service Pack 1), and you have since upgraded Vista to Service Pack 2, you will need to track down Vista Service Pack 2 installation media before proceeding.
Additionally, you may not use OEM installation media. OEM licenses of Windows are tied to the PC that you purchased it on. If you use OEM media or an OEM license key, you may find yourself unable to activate Windows after moving it to a new PC.
Here are the steps.
First, copy all of the files from your installation media to your hard drive. I put them in a location off the root of the drive like C:\Setup. (You can try to run the installation directly from the CD/DVD/whatever, but I found that sometimes after you switch to the new machine, the installer is confused about the new hardware and cannot find the files that it wants to read off of the installation media. Best to be safe; to avoid problems, just copy it all to the hard drive.)
Start Windows Setup from the copy of the installation media that you placed on your hard drive, and choose the upgrade option. (Yes, you can upgrade Windows XP to Windows XP, or Windows 7 to Windows 7, etc.) You may have to deal with issues identified by the compatibility checker (for example, Vista will make you uninstall PowerShell if you have it installed).
Once you get through the initial questions and the actual setup begins, you need to babysit it. At some point, it will announce that your computer needs to be rebooted and give a countdown. For Windows 7, this happens during the “Expanding Windows files” step at around 18% complete.
Let Windows shut down normally, but do not let it boot back up. Once your machine enters the reboot cycle (BIOS screens and whatever), power it off. If your machine passes through the BIOS screens too quickly, you will be given a boot menu for 2 or 3 seconds before Windows actually starts to boot, asking if you want to boot to Windows Setup or your previous installation. Quickly hit one of the arrow keys to halt the timer, and then power off the machine.
At this point, the next time you boot up your PC, it will continue with the Windows upgrade process. Now is the time to move the installation to the new PC. Either take the hard drive out and install it in the new PC, or use a tool like Acronis TrueImage to copy the contents of the hard drive to another one that ends up installed in the new PC. If you do copy the drive instead of move it, be sure not to accidentally let Windows begin booting before the drive is ready to go in the new machine.
Now, boot up the new PC and let the upgrade process continue. This should be uneventful, but Windows 2000 and XP may ask questions about driver installation during the upgrade. When it is done, you have your Windows installation successfully moved. You may have Windows Genuine Advantage yelling at you until you activate Windows, but be sure to get your drivers installed first if possible to avoid having to activate twice.
Once you are completely finished, remember to delete the files on your hard drive from the installation media that you copied over at the beginning of the process.
A few notes. You don’t actually have to do an in-place upgrade of the same Windows version for this procedure; you also have the choice of upgrading to any later version of Windows that supports a direct upgrade path (i.e. Windows Vista to Windows 7), or upgrading from one edition of Windows to another (i.e. Windows 7 Home Premium to Windows 7 Professional). In such a case, you will be upgrading to a new version of Windows and switching machines at the same time. You can follow the same steps outlined above; start the Windows upgrade, after the first reboot move or copy the hard drive to the new system, and then allow it to boot up and finish the upgrade on the new PC.
Finally, if you chose to copy your hard drive instead of move it, and you want to continue using your Windows install on your old PC as well, you’ll need to cancel the upgrade on the old PC at this point. Boot up and choose the option that is not “Windows Setup” at the boot menu. When you get to the desktop, you will get an error message that indicates that the upgrade failed. However, every time you reboot, you will be given the upgrade choice again. You can kill this by opening msconfig, switching the default boot option, and deleting the “Windows Setup” option.
You also probably want to enable the display of hidden/system files and clean up the setup files that were left on the root of your drive, all starting with $WINDOWS.