If Windows fails to boot because of a defective file (which will usually produce an error such as "Failed to load library xyz.dll"), try excluding this specific file from bootup. To do so, use Sysinternals Autoruns, try to find the file that's giving you trouble, and uncheck it.
Restore Windows logon
A third-party tool or a virus might have replaced your standard Windows shell (explorer.exe) with a different shell. Try to run Safe Mode and open up regedit.exe; if you don't see your desktop, use Ctrl-Alt-Del and open Task Manager to run regedit. Go to HKEY_LOCAL_MACHINE -> SOFTWARE -> Microsoft -> Windows NT -> CurrentVersion -> Winlogon, double-click Shell, and replace whatever is there with "explorer.exe".
As we discussed earlier, Windows Vista and Windows 7 include the Windows Recovery Environment, or WinRE. If Windows fails to boot, WinRE should automatically launch its Startup Repair feature, which will try to repair corrupt disk data (using a superficial
chkdsk check), restore the partition table, and fix boot configuration data (BCD). If it can't help, Startup repair asks you to restore the last system restore point.
As Startup Repair combines several troubleshooting techniques into one, it's likely to solve most boot problems. Check out Microsofts Technet to get a detailed overview on what gets fixed once you run Startup Repair.
Use WinRE for full-on troubleshooting
Startup Repair didn't work? Then the root of your problem lies much deeper. It's likely that some essential master boot information, registry information, or file system data got very screwed up. For that, you need to use the full power of Windows Recovery Environment. Simply boot from your DVD, CD, or thumb drive (as described in above) to enter WinRE. From here, you should first try an older restore point. If that fails, walk through these steps to get your system up and running again.