I did it once with win98 SE -- went to a new CPU/MB combo with the old install. Yeah, it grumbled, the lights dimmed, but it worked.
That said, don't do it unless in an emergency.
When you upgrade, if you don't have a second hard drive, buy one. install onto the new hard drive, and then migrate your other crap over.
I mean, you can do it, but you're taking all those months and years of accumulated windows crap, and your putting it in a foreign system. Take advantage of the fresh hardware for a fresh sw install.