First, if that's an HP All-in-One printer, I wouldn't be surprised in the least if that's what's causing the problems. HP drivers have become such ***** lately, they're all but unusable. All-in-One devices in general tend to be problematic, but HP gets special mention.
After that, the fact that the drive had some bad sectors on it would say to me that replacing the HDD would be the first thing to do. There could be other sectors that were good enough to pass the scan, but are still bad.
A larger power supply wouldn't hurt, but I'd suspect the HDD before anything else. If the power supply weren't up to the task, you'd be more prone to the system rebooting suddenly, or just shutting off out of nowhere.
While investigating prices for a new drive, you could try loading Windows and leaving off the All-in-One printer to see if things remain stable for a day or two. If it turns out to be the printer driver, you're unfortunately only left with the options of hoping there was some rare planetary alignment and whomever HP subcontracts the driver development out to actually fixed the problem without making things worse in other ways, or telling your friend that they won't be able to use their printer.
A friend's HP machine went ker-put:
HP Pavillion AMD Athlon 64 3400+ (ugh)
XP Home SP2
200 GB WD hard disk
512 MB PC3200
integrated memory card reader
128MB on-board video
250 watt PSU
fully patched, Symantec internet security, spysweeper
Could load Windows, couldn't run most applications, though... programs would immediately start and shut down. Was able to back up his documents, created two restore disks (HP and they're stupid restore pattitions), tried a to repair XP and it froze 1/2 way through. Booted from the restore disk and did a full "destructive" recovery... fine.
Unistalled a lot of the pre-loaded HP bloatware... added AVG antivirus, Zonealarm, Adware, etc... was running great. Added another brand new 512 of Ultra PC3200. Running awesome. Brought it to him, installed his All-in-One printer, went home.
He told me a few weeks later "he was never able to get back into the computer". I picked it up, Windows would not load, missing system files. No safe mode, no boot from last best... dead again. Windows recovery froze at 52%. Ugh. Destructive recovery again (I figured he must have done something dumb... perhaps started the Recovery by mistake when it was booting up?)
Here we go again. This time, I found that the 200GB hard disk had 7KB in bad sectors. Downloaded the WD utility, it was able to repair the bad secotor.. ran another scan, HD passed,looked great. Formated it twice before proceeding. All better. Was running great. Installed the all-in-one, rebooted... it took 10 minutes to restart, and then was told lsass.exe, "the endpoint format is invalid". Assumed it was the sasser worm? (No infected machines on network, behind a router firewall, Zonealarm, AVG and fully-patched.) Googled Lsass.exe, it and it's a real Windows process: http://support.microsoft.com/?kbid=893712
Couldn't load safemode or anything to try this registry tweak. Unplugging the printer did not help at all.
I don't know what to try next. Considering it's only a 250 watt PSU, I'm guessing it pretty under-sized, funky, or both. That's what came from HP though (not saying much). All I added was a stick of ram and a printer, and a wireless NIC card, months before the first problem.
I guess the next step is to try a new PSU. But do these behaviors sound like PSU issues? No random rebooting previously... nothing odd.