Moving Windows to new hardware without reinstalling
Introduction
This guide is aimed at people who have just built a new PC and are looking to move their existing hard drive and Windows installation to their new hardware. Specifically it applies to moving Windows onto a new motherboard and/or hard drive, as any other hardware changes should be handled gracefully by Windows on it's own. It works only on Windows 2000 or XP. This guide uses the Microsoft System Preparation Tool (sysprep) to move the OS without having to do repair installs.
Warning: Microsoft OEM Licences are tied to a specific PC, you are not allowed to transfer them to new PCs. Microsoft consider the motherboard to be "the PC" for licensing purposes as they only allow for motherboard replacements if the old one has failed. Retail and Volume Licence copies do not have this restriction.
SysPrep
Sysprep is intended for system administrators with large numbers of Windows PCs to support. When Sysprep is run it removes certain key pieces of information from Windows. Its licence key, computer name, network information, security IDs and installed hardware are removed, then the computer is shut down. At this point the sysadmin is supposed to clone that PC onto all their desktops using Norton Ghost or a similar utility.
The next time that windows installation boots it will run a mini version of Windows setup (The GUI part) and ask for the product key, computer name and a few other minor details, then detect and install all your hardware. The PC will then reboot into a fully working Windows installation, with all the applications still installed, saving the sysadmin time that would be taken by going to each PC and installing Office, Firefox, anti-virus and all their other applications.
We are abusing this slightly. Instead of cloning using Ghost, we simply move the hard drive into the new PC and we are only cloning onto one PC. However, this does not matter as Sysprep is unable to tell the difference. At the end your Windows install will be running on your new hardware and all your porn, warez, software and spyware will be intact.
Warning: Since SysPrep removes your license key from your windows install, you must know what your licence key is. On OEM computers it will be a sticker on your computer case, retail copies probably have it on the CD case and for Volume Licence copies see your network administrator. If you are running a pirate copy that some local kid, who knows all about computers, installed for you then you are on your own. There are utilities available on the internet to tell you what your current licence key is and if you are in any doubt it may be worth running one, if only to check that it matches the one stuck to your PC or CD case. Many computer shops illegally installed volume licence wersions of windows on their OEM PCs because they were too lazy to type in the license keys each time.
Installing sysprep
You will need to obtain a copy of SysPrep. Each version of SysPrep is specific to one version and service pack level of Windows. You can obtain the XP SP2 version here and the 2000 SP4 version here. If you are running earlier service packs you are on your own. Upgrade! You should be able to find them in the \SUPPORT\TOOLS folder of you Windows CD or your Service Pack CD. Do not use the version from your Windows CD if you have applied a service pack after installation.
Extract the following 3 files from DEPLOY.CAB and place them into C:\Sysprep
Sysprep.exe
Sysprep.inf
SetupCL.exe
Preparation
You should have your new PC built and able to boot to the BIOS or "Operating system not found" screens. Ideally you could test it with a LiveCD such as Knoppix to make sure that it's working, but as long as you have a working display and keyboard and the machine can stay up for 10 minutes without crashing you should be fine.
Hard Drive Controller compatability issues
If your HD is an IDE (ie. Parallel ATA) drive then you should not run into issues. If it is SATA then you could run into problems if the SATA controller on your new motherboard is different to your old SATA controller. The same applies to SCSI, but this is beyond the scope of this article.
The short version is; if the SATA controller on your new motherboard is integrated into the chipset then it should work. If it is an add-on chip or a PCI card then it probably will not work. All new motherboards should have proper onboard SATA although many have additional add-on chips as well.
You will have to check your motherboard manual to be certain, but generally speaking if there is a chip made by Promise, Highpoint or Silicon Image then this is likely to be an add-on SATA controller. You will usually get better performance (or no difference at all) from using the onboard controller.
The long version is; Windows will only boot from a disk controller that was installed and working when sysprep was run. Since nearly every motherboard capable of running Windows XP will have onboard IDE (which is compatable with onboard SATA), moving to onboard SATA should work fine. If by some fluke both of your boards happen to use the same add-in SATA controller, then that will work too. I would still move to onboard SATA if this is an option.
ACPI compatability issues
This should not be an issue for any hardware made after 1999, however if the source PC has ACPI enabled but the destination PC does not support ACPI then cloning will not work. If the source PC does not have ACPI but the destination does then cloning will work, however you will not get the benefits of ACPI. You can check if ACPI is supported by going to Device Manager, expanding the Computer section, it should say "ACPI uniprocessor PC" or similar. Unless you are moving to a really old motherboard then you do not need to worry about ACPI issues.
Moving the windows installation
Backup your files. Nobody else is responsible if you trash your data, whether it be as a result of reading this article or just because the dog ate your hard drive while you were in the middle of moving it.
Simply double click sysprep.exe. Ensure that the options selected are suitable for what you want and click the 'Reseal' button. Since you are moving a single PC, it may be useful to tick the option to not regenerate Security IDs. Regenerating them may break some application with a draconian licence key arrangement or similar. You only need to do this when cloning to multiple PCs, as having the same Security IDs show up on the network can cause problems. Once you click 'Reseal' your PC will slowly shut down, it may take significantly longer than normal.
Do not switch your PC back on again. If you do switch it back on by mistake, you can either click cancel to have it shut down again, or you can go through the setup process, do whatever you wanted to do, then run sysprep again.
Move the hard drive to your new PC. Switch it on and see if it worked.
If it has worked you should see the familar sight of the windows setup screen. You will only be asked a few questions and then Windows will reboot.
After the reboot your PC should be working normally with all your apps and data intact.
Things that can go wrong
Operating system not found
Ensure that your BIOS recognises your "new" hard drive and that it is configured to boot from it.
Invalid system disk. Insert disk and press any key
Boot from your Windows CD, go into the recovery console when prompted during setup, log in and type: FIXMBR
Could not find NTLDR (or NTDETECT.COM or similar)
Boot from your Windows CD, go into the recovery console when prompted during setup, log in and type: FIXBOOT
Blue screen of death: Inaccessible boot device
This means that your new disk controller is not compatible. You could try moving it to a different controller if you have several available, or you could just give up and put it back into the old PC. However the most sensible option will be to perform a repair installation of Windows. Boot from your Windows CD, but remember to hit F6 and load any SATA controller drivers if necessary. When prompted, let Windows do a repair installation, this should install the necessary boot-time disk drivers for you.
Other questions
Can't I just move the drive over and do a repair installation?
Yes, but the result isn't as good. While Windows XP and 2000 are nowhere near as bad as Windows 98 was for old devices hanging about and causing problems, there are still a few that do, most notably network card drivers. It is far better to have sysprep cleanly remove all your device information before bringing a windows installation up on completely new hardware
What if I want a new hard disk in my new PC?
Instead of physically moving the HD, use a utility such as Norton Ghost or Acronis TrueImage to clone the old disk onto the new disk. Ghost will give you the opportunity to resize the partitions during cloning if your new disk is a different size than the old one. Other than that the move is the same. The same caveats about disk controllers and ACPI still apply.
My old PC was running slow which is why I am upgrading, should I follow this procedure?
If your old Windows installation is broken and/or full of spyware, then after moving to a new PC, your new PCs Windows installation will still be broken and full of spyware. If you can fix these problems then great, if you cannot then the forums will advise you to flatten and reinstall. You may as well just reinstall after moving your HD to the new PC.