PCs experience registry corruption for a number of reasons, in many cases the corruption is caused during shut down and it is difficult to trace the trouble at this stage because during shutdown the system is killing processes and drivers for shut down. So finding the true cause of corruption is definitely not easy, thankfully if your system is able to start up, then you can run a registry cleaner to fix the corrupted registry.
When registry corruption occurs and a system fails to start properly displaying random errors continuously, you still have hope. When the system fails to start at all, depending on what Windows OS level your system runs, you may be better off doing a system restore from a CD. Windows 2000, XP and Vista have this capability.
Power Failure - when the computer system loses power unexpectedly it often causes a corrupted registry hive. In the event viewer you can identify these errors with event ID 6008. The reason why registry corruption occurs during power loss is because when a program or application is updating the registry at the moment of the outage that update is never fully completed. These inconsistencies cause your PC to fail to interpret parts of the registry and end up with a very sluggish or inoperable system.
Faulty Hardware and File Corruption - In addition to the registry, other files may be corrupted. It's important to determine if only the registry alone is corrupted or if files (system files and data) are corrupted as well. When system files and data are corrupted, this could be an indication of faulty hardware, this is the type of hardware that writes information to either RAM, cache memory or the disk itself.
Registry updates at shutdown - If your system is experiencing consistent registry corruption for no specific reason, it may be that the problem is occurring at shutdown. If the registry hive is written to disk during shutdown that may cause the computer to stop responding before writing is completed.
If system is unresponsive and can not be started, we suggest visiting Microsoft's Knowledge Base on recovering from a corrupted registry that keeps your system from starting up. Otherwise you can use the windows system restore utility to restore your system to a previous state before the registry corruption occurred.
Once the system restore has taken place and the windows registry seems stable, analyze the hardware, the disk, firmware on the hardware and your BIOS level for your PC. Certain hardware updates require a specific level of BIOS all depending on the PC manufacturers. Apply the latest BIOS and firmware for your PC.
Now you can narrow the scope by closing applications one by one and then shutting down your computer gracefully, if you still experience hangs or errors during shutdown or boot ups the cause may be that an application isn't shutting down properly when you shut your system down, therefore it never finishes updating the registry before the system shuts down.
The windows registry will accumulate plenty of junk in a process like this, if you determine that it is an application that's causing all the trouble, identify it and uninstall it. Then use a registry cleaner to clean up your registry. Once that's completed you can reinstall the application.