I'd remove all partitions and use Windows 7's own install and partition tool. It's about step 8 at http://www.blackviper.com/os-install-guides/windows-7-install-guide/
HOWEVER that hour long format may indicate a bad HDD.
Also, all the work to get everything working again is between you and HP. I prefer using the restore media.
Dear Hardware Experts
I should be grateful for your help with re-installing Windows 7, after replacing the hard disk drive in an HP Compaq.
The installation proceeds for about one-and-a-half minutes, past the 'Windows is loading files' message and as far as the coloured globules doing a dance around each other.
The display then simply freezes, without an error message. Does anybody know the explanation?
It may be worth mentioning that I had the foresight to make a recovery disk (which offers diskpart) while the old hdd was still working.
So I made 2 partitions for W7 to install itself into, formatting 500 gigs took about an hour.
This didn't help, but it confirms I think that hdd and motherboard are talking to each other. No cable connector has come adrift.