Changing hard disk with ssd, can I migrate contents so that I can switch drives without a hassle?

Changing hard disk with ssd, can I migrate contents so that I can switch drives without a hassle?

For instance, keep my Windows configuration and installed programs and documents


I use imagex.exe to do this all the time.

Pros:

  • Free tool from Microsoft
  • Can copy the whole HD, in tact, ready to boot after your done.

Cons:

  • You need a place to store the image file it creates, it will not duplicate straigt from one disk to another. This can be on the original HD however, if it's less than 1/2 full.
  • It's part of the Windows AIK, which is a rather large download.
  • You need to know how to use it from the command line, it doesn't have a GUI.

To capture the existing HD image: imagex /capture C:\ D:\tempfile.wim "SomeName" [/compress fast]
Format the new drive however you want it (use Disk Management to make it easy, also don't forget to make the partition where Windows is going as Active).
To write the new HD from the image: imagex /apply D:\tempfile.wim 1 E:\

In this example the source HD is "C:", a temporary drive (USB or whatever) is "D:" and the new drive is "E:"
Take the old drive out, leaving just the new drive and you're good to go.

Edit:
This was originally written for XP and older OSes where the boot manager didn't care about partition labeling. The new BCD system does care about boot labels, so the BCD will need to be "fixed" in Vista, 7, 8, etc. Lots of details available in my Answer to a similar question on SF. Also, the Windows Setup CD can be booted and used to "repair" the installation automagically.

Alternately, there are 3rd Party tools available that make this process fairly easy (I'm always a bit leery of these tools as I've had problems with some of them in the past, no problems recently however)... Such as CloneZilla.