Try this, it worked for me when I installed an OS on my laptop, because my laptop 's CD drive is broken, I took the HD to my desktop, installed the Windows there then put it back to my laptop.
On the Compaq, restart Windows with the Windows CD as if you were going to install it, when it gets to the point where it asks you if you want to install or repair, select repair,
let Windows do the work, when it's done it will tell you to restart, without the CD, usually that will do it.
B