I'm guessing you didn't make a recovery CD when you first installed windows, usually you would just use that. However in this case, its really bad. Even if you did re-install windows, the probability of it stopping halfway due to some system critical files that are now set to read only is probably very high. Even if it does install properly, the chance that the virus is still in the drive would be pretty high too. There are three courses of action that you can take from here.
1: When you first got your hard drive (hopefully in a box) there should've been a set of diagnostic disks (Floppy disks) that came with it. Hopefully the virus hasn't spread into your cmos and it will boot from the A: drive (your floppy drive) first. If it does it should be easy to format the disk from there.
2: Tap into your cmos menu. As the pc first starts up and boots, you should be able to press either F1 or F2 to get to your cmos menu. If anything has been changed since you last looked at it, the virus is in your cmos, which means it won't matter what the fuck you do, it will install itself on your new drive. An easy way to combat this is to unplug your computer and take out the cmos battery on your motherboard (should look like a giant hearing aide battery) for a half hour. after the cmos loses battery power, it goes back to its default programming. If you can get into your cmos you should be able to format the drive from there, unless you have an older computer.
3: Take the hard drive and turn it into a paper weight, and get yourself a new drive. Also, if you have a mirco wave you won't miss, put it in there. Just make sure its outdoors.