Q: I'm running Windows Update. It scans, but the scan hangs and never finishes. What should I do?

A: I recently had exactly this problem. During an update, the update crashed and it seemed to leave my update database and manifest corrupt, which is why it could no longer scan for updates. There are several steps to try to resolve this, and I'll close with what worked for me.

You can try and verify the integrity of your system files. Open an elevated command prompt (Open the Start menu, type cmd, right-click Command Prompt, and select Run as Administrator) and run the command

sfc /scannow

The next option is to stop the Windows Update service and its related services with the commands

net stop wuauserv net stop bits net stop cryptsvc

If the Windows Update service won't stop, go into services.msc and set the Windows Update service to startup type Disabled, then reboot the box. Once the reboot is complete, Windows Update won't be running. Once Windows Update isn't running, you're going to rename the local software distribution and catroot2 folders so they're re-created. Navigate to %windir% (e.g., c:\windows) and rename SoftwareDistribution to oldSD, then navigate to the system32 folder and rename Catroot2 to oldCR2. Start the services you stopped. (If you set Windows Update to disabled, you need to go into services.msc and set the service to Automatic (Delayed Start) before you do this.) Once your test is complete, you can delete the folders you renamed (i.e., oldSD and oldCR2).

If it's still not working, you can re-register all the Windows Update DLLs. You need wuauserv, bits, and cryptsvc stopped while running these, then start them after running. So you may need to set Windows Update service to disabled again, reboot, etc. The easiest way is to post the below into a batch file and run it.