windows7 install from hard drive going bad

Hopefully this is the right place for this!

I have a hard drive that has windows7 home premium installed that I am being told is going bad and needs replaced. Here's my question: is there any way to reinstall my copy of windows 7 home premium from my going bad hard drive (it has the recovery partition on it) and reinstall it onto my new replacement hard drive w/o having to buy windows 7 again? I would like to keep my dual core computer but don't want to have to buy another copy of windows 7. :(

This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.