But today it proved fatal, after booting again I repeatedly got the blue screen error message shortly afer logging in (mainly shows some unexpected exceptions and core dump details) which displayed
REGISTRY_ERROR and blah blah... and the system got rebooted immediately. The next time I tried to log in through the safe mode to troubleshoot the issue, but surprisingly it resulted in the same error.
Then I tried to logon as another user (luckily I had two administrative privilege users), even that attempt failed with the above error message.
Finally I was able to login in the safe mode with networking support as the second user, did chkdsk -F as I suspected some disk errors which may be fixed, but still the problem was not solved.
After hours of futile attempts, I deleted the first user account (my active user account when I did the hard reboot) and out of the blue things worked, but not without painstaking effort.
So here are some solutions which you may help you to recover from STOP 0x00000051 REGISTRY_ERROR and some best practices.
1. Always have two user accounts with administrative privileges in an Win XP or 2K box, one of which may come to your rescue when other user's configuration may be corrupted.
2. When you get the above error, first log in in safe mode with networking support (press F8 Key after you boot windows to do so) and do a chkdsk -F which will scan the disk completely fixing the errors and restore bad sectors if any.
3. If solution 2 doesn't solve your problem, then log in through safe mode as another windows user and delete the user account you were in before you got that error message, most likely that user's configuration would have be corrupted.
Before removing an user account you should take backup of important files in that user's My Documents, desktop items, etc, then
3.1. Goto Control Panel -> User Accounts, click on the user account you want to remove
3.2. Click on Delete the account link.
3.3 In the next screen, click Delete Files option (removing the user account alone without the associated files didn't solve my problem, but the system rebooted again with the same error message).
4. Last but not the least make sure you don't do abrupt shutdown ever and its good practice to run PC Doctor for Windows at least once in a month to make sure that everything is fine, also creating a rescue disk would be helpful.