That factory preinstalled Windows 7 is a corrupt install to begin with, larded with bloatware and useless duplicate utilties that have much better versions built into Windows 7. HP has the worst load of bloatware in the industry.
What I would do is get the superior Clean Reinstall - Factory OEM Windows 7
using the installer provided and following the steps closely to get a perfect install.
If you insist on the factory install then I'd try running it from partition following steps in HP System Recovery
or wiping the HD with Diskpart Clean Command
to see if it will complete from disks then. But you need the Windows 7 installer to boot to the command line anyway, so might as well get the clean install.