You can use the Last Known Good Configuration login option to restore your computer’s registry to a state when you were last able to boot successfully. The Last Known Good Configuration option restores the registry key HKEY_LOCAL_MACHINESystemCurrentControlSet.
 
To access this utility, reboot your computer and immediately begin tapping the F8 key. This will take you to screen where you have several boot options. Select Last Known Good Configuration and hit Enter.
The computer will reboot and go directly into Windows if the changes were successful. Recovering in this fashion is easy if it succeeds. Depending on the condition of your registry, this option may not even work and a complete reinstall and reformat may be necessary. Last Known Good configuration is generally successful when attempting to recover from a bad device driver installation.
 
You may find it necessary to access the boot options and go into Safe Mode to remove any software or drivers that caused your computer to fail. You can also access the System Recover option by going to Start, All Programs, Accessories, System Tools and then System Recovery. If you have recent restore points set, this is a great way to revert your computer without losing data files.