never attempt to run factory recovery on battery power. It should be possible to run factory recovery again, this time with the laptop plugged into the mains power socket.
You could have securely deleted your files without such a drastic measure, by using a "shredder" utility like Eraser: Eraser
That would not have affected Windows at all.
PS. I hope your friend didn't have any important stuff of his own on the laptop, becaused if he did you've wiped it off.