Reasons for Corrupt Registry
Many of the reasons for a corrupt registry in the first place is a virus attack and poorly designed software. If you uninstall a program or that program crashed your pc or laptop, then you will have registry errors. If you were unfortunate enough to be attacked by one or hundreds of different types of malware or viruses, then your registry will have errors. Especially if the attack was severe enough to bluescreen your machine or cause your desktop to suddenly not function.
I run or have installed, several types of anti-spyware, anti-malware, anti-virus type programs at the ready in case my machine is attacked. I was using a free anti-virus program last month and was attacked by a trojan downloader that dropped hundreds of viruses on my machine. I was able to recover it, but not after 11 days of a real fight. I purchased Kaspersky Internet Security and was able to recover the machine. At one time, I had in one day, 141,000 network attacks from a porn downloader site overseas. I do not surf porn, but this site was from Turkey and Germany, it was attacking and attempting to download to my machine.
I had done a reverse ip lookup once I re-established my internet and found these websites by ip. I then was able to figure out how to ban that ip from within my firewall. My isp for my wireless connection was unable to help me ban incoming traffic from that source. You will most likely be on your own, that is why I am suggesting that you have these programs at the ready. If you have available an external hard drive, then you can install some of the virus, malware programs there ready to run when you have a problem.
There are many free programs that I use. I would suggest Malwarebytes as one of those programs.