That’s one of those questions where there are a thousand possiblities and the only good way to prune that tree is to have an expert sit down in front of the machine.
Defragging the hard drive is almost certainly a red herring and is in fact quite dangerous. When the system is unstable, running a program that, if it crashes at a bad time, can render your hard drive inaccessible is not smart. Get Windows starting, running and stopping OK first.
Extreme slowness is normally a result of something else running that shouldn’t be, or that is crashing and restarting behind the scenes continuously. The corrupted registry messages you got implies the latter is likely.
You can fire up task manager, switch to the processes tab and click the CPU header to sort the processes by CPU consumption. On a healthy system with nothing going on, “System Idle Process” should be using 97% and everything else should be 0 or 1. If you’re running defrag or something like that, it ought to be using around 20% , everything else 0 or 1% and system idle taking up the rest, about 80%.
If you see anything process using any more than about 5%, you’ve got a potential culprit. The challenge then is to determine what it is, and why it’s acting up.
You can search your harddrive for the culprit exe name to determine what program it’s associated with. i.e. if task manager says “spmb-wg.exe” is hogging CPU, search for “spmb-wg.exe”. If you find it in “C:\program files\wondersoft\masterworks super musicblaster”, then you know which program to uninstall/reinstall in an effort to fix the problem.
If the culprit program’s in C:\Windows or one of its subdirectories, then try looking at the exe’s properties. Often that’ll tell you who made it or give a clue as to which installed program it’s affiliated with. If it’s from microsoft you’re probalby gonna have to reinstall windows to clear up the problem.
More than once I’ve had these super-slow problems caused by a defective antivirus or internaet firewall program. Those programs insert themsleves into the middle of damn near everything that goes on inside the box and if they’re ill, the whole system slows to a crawl. And they often don’t look like CPU hogs while doing it.
If you can’t come up with a plausible culprit by other means, consider uninstalling and reinstalling any anti-virus and/or firewall software you have. And that includes things like ad-aware.
One final unrelated thought: Check your hard dive free space. If something went stupid (or you got attacked), you could have filled the hard drive almost completely with junk. That makes Windows very constipated. If the hard drive is nearly full, say 10% or less free space, the challenge is to find and delete the junk. I doubt that was the original cause of your troubles, but it may have been an intermediate result.
Good luck. Consider copying any important files off to CD or whatever before the thing seizes up completely or you inadvertantly kill Windows trying to save it. Badly damaged instalations are timebombs and you never know when or why they’ll go off.