Tuesday, January 15, 2019

Solution - Windows Update Can't check for Updates, Update hangs

Problem - Windows Can't check for Updates; Update hangs. 

This article fixes a variety of Windows update ills.  Steps are comprehensive, compiled from multiple sources and tested by the author on dozens of computers.  Although the steps are numerous and geeky, they are almost guaranteed to fix all kinds of Windows Update problems.

Originally posted 2016.  Updated for Windows 10, with more details, 2019-Jan. 

Symptoms:
Windows update System Tray icon reports "Windows can't check for updates"
Windows Update hangs for hours at 0%, 44%, 90% and other percentages
Windows update "Checking for updates" status bar / progress bar does not move
The Windows Update Status indicator runs, but shows no activity or
The Windows Update Control Panel Page shows a Red-shield icon and warns you should run an update regularly, but it does not actually run the update.
Windows Cumulative Update hangs at Initializing



Reason:
Windows Update may be corrupted.  Corruption can especially happen if an older computer is brought online after a long time without updates.


You can run these steps even if you are not sure the symptoms match your problem.  There is no harm, other than taking the time.

These steps resolved the problem on my computer, but expect
to take several hours to run diagnostics -- plus more time 
to catch-up on the Windows updates. 

Special note:
Windows patch 1803 KB4023057 was buggy.    If error 0x80070643, go to Control Panel, Programs and features; scroll to the bottom. Uninstall the misplaced Microsoft update.  Reboot and see if Windows Update behaves.


Important Prerequisites:

Windows 10 Update can be found in "Settings", under Updates and Security.  Or use Cortana, searching for "Windows Update", finding "Check for Updates".  For Windows 7, see the Control Panel, Windows Update


A.  Confirm the PC's Date and Time are correct.  (Click the time in the lower-right System Tray).  Windows update panics if this is too-far out-of-sync.

B.  If you have not already done so, reboot the PC.

Reason:  Sometimes Windows update needs to update itself before it can update other things and this often requires a reboot.

C.  After the reboot, wait 5 minutes, then check the Windows Update status again.  If pending updates, give it  (20 or 30  60 minutes) to see if the status or percent-status changes.  If it starts changing, let the update complete.

Some updates, such as the Windows 10 Anniversary update, are slow at updating the status and can sit at "initializing" for an hour or more before it began changing the downloading percentage.  

If the PC goes to sleep during this time, this step never seems to finish.  This seems to be a particular problem with laptops, which often have tight power-management policies. For big updates, consider turning off the computer's power-saving features (turn off computer after xx minutes inactivity...)  see Windows Settings, Power Savings.

D.  If still hung, or you find you keep oscillating between downloading and initializing, continue with these steps, which depend on which version of Windows is running.


Decision: What specific version of Windows are you running. 

Launch Windows Explorer (File Explorer, not IE).

In the tree-side, locate "This PC", "My Computer" (or "Computer").
Other-mouse-click "This PC" and choose "Properties" from the context menu. 

Note which Operating System is installed, which Service Pack, and whether it is 32 or 64-bit.

For example:
Windows 10 Home / 64-bit Operating System, x64-based processor - Typical
Windows 7 64-bit
Windows 8 64-bit  SP1



If
Windows 10,
Windows 8.x,
Windows Server 2012


1.  Search the Internet and download, from Microsoft, the current version of "Windows Update Troubleshooter"

Be sure to download only from Microsoft's site.

2.  When downloading, and prompted for "Save-as" or "Open".  Choose OPEN.

If prompted for administrative rights, type your administrator password (rare for most home users).

Important:  As it runs, it will probably prompt, "Did you know there are pending updates for this machine?"  Select "Skip"  (the reason you are running this utility is the pending update isn't applying and that is why you are reading this article).  Follow all remaining fixes by clicking (apply).

"Starting Bits service" will take a noticeable time - 5 minutes.

3.  When the Troubleshooter completes:

If all is well, and problems report as 'fixed,' reboot and retry the Windows Update (See Gear-icon, Windows Update). 

If Windows Update Troubleshooter reports errors that could not be resolved, reboot to be safe, then continue with the next Manual steps.


Manual Steps:

Run these steps if the automatic Windows Update fails.


A.  I recommend turning off Windows Power Saving features (run full power; do not turn off disk after inactivity, etc.).  For laptops, use wall power rather than the battery.  Make these temporary changes:

See Gear-icon (Settings), Power and Sleep.
Set "When plugged in, turn off: Never"
Set "When plugged in, Sleep: Never

B.  Run the DOS CMD Prompt as "Administrator" with these steps:

From the Windows tile-menu literally begin typing the word "CMD"  (or use the Cortana Search box).  Click once on the found "Command Prompt" icon -- but do not launch or open.  


Other-mouse-click the "Command Prompt" icon, choose "Run as Administrator" (or More, Run as Administrator).


DOS runs as an "elevated command."



C.  At the Administrative Command prompt, type these commands, one-at-at-time, pressing enter after each.  Net Services are being stopped to free file-locks on the software distribution folders.  "Service not started" messages are acceptable. 

net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
 

Ren C:\Windows\SoftwareDistribution SoftwareDistribution2.old
Ren C:\Windows\System32\catroot2 Catroot2.old 


Where "Ren" is Rename and you are making a backup folder named "...2".  If rename folders fail, consider using File Explorer to delete the offending folders or the old "2" folders. 


net start wuauserv
net start cryptSvc
net start bits
net start msiserver



D.  At the same Administrator's DOS prompt, type this command, pressing Enter after typing.  You must be running in Administrator mode!

DISM.exe /Online /Cleanup-image /Scanhealth


/ScanHealth will have hesitations while running and may take several minutes before displaying an ASCII  [0%---100%] status bar.  Expect a total run-time of an hour.

Important:  Wait for "operation completed successfully".
The hard drive light will show activity even if the status bar does not move.
Caution:  Once started, do not interrupt or cancel .

If it finds a problem, /ScanHealth step will report something along the lines, 'Repair possible'
If all is well, it will report "No component store corruption". 

In either case, continue with the next step!


E.  Next, at the same Administrator Command-prompt, type this DOS command:

DISM.exe /Online /Cleanup-image /Restorehealth


Again, expect delays, no screen activity, and an ASCII status bar.  Another hour or so...
On success, look for "The operation completed successfully"


F.  From the same Administrator DOS prompt, type this command to repair obvious operating system files from the backup cache:

sfc /scannow

Expect about a half-hour. 

If errors ("Windows Resource Protection found corrupt files but was unable to fix some of them"):  Ignore and do not worry - these are obscure and likely not germane to this article.  Besides, the log file (notepad C:\windows\logs\cbs\cbs.log) is thousands of lines long - who has time to read it?


G.  When done, close the DOS Command Prompt window "X" or type "exit"

H.  Reboot / Restart

On reboot, Windows may apply an update.

I.  Open the Windows "Settings" menu, run Update & Security manually; click "Check for Updates". Hopefully, all updates will apply. 

Again, as a warning, some updates, such as Windows 10 Update 1803 are really slow at telling you their progress.  Give the computer time.  If it seems really hung, reboot and check again, following the per-requisites at the top of this article.  These steps seem needlessly complex and Microsoft has much room for improvements - especially with the Update Fix Utility.  I wish Microsoft showed more diagnostic and details as these updates are trying to be applied; these are devilishly hard to figure out.

J.  At some point, possibly after all updates have applied, return Power Savings settings to your preferred values:

See Gear-icon (Settings), Power and Sleep.
Set "When plugged in, turn off: (1 hr)
"Set "When plugged in, Sleep: (30 min)

Your comments on these steps are welcome.


If
Windows 7.x,
Vista, or
Server 2008


Note: These steps were tested and worked, but the Windows 7 section of this article is no longer being maintained.

1.  Using Internet Explorer (it must be IE), go to this site:

http://support.microsoft.com/kb/947821

2.  Scroll to the Windows (7) section.

3.  Download and run the correct version of Windows Update(noting which version of Windows, 32 or 64-bit, etc.).

Installing and running will take up to an hour and may have long hesitations on the status bar -- allow it to complete; note the hard drive light will be busy even if the status bar does not move.  Microsoft notes this tool, the "Windows Update Standalone Installer" is updated regularly and you should always use the most current version, as downloaded.

4.  Open the Control Panel and run Windows Update again.  The problem should be resolved.  As always, wait a respectable amount of time to give slower-updates time to update the status indicator.

If you are still having problems:

This low-risk solution has been reported to help, although I have not needed this in my experience.

a.  Start an elevated Command Prompt:  (From the Start-menu, 'other-mouse-click' the Command Prompt icon, choose "Run as Administrator")

b.  Type this command and press Enter. 

netsh winhttp reset proxy

c.  Attempt Windows Update again.

d.  Consider stopping Netflix and other streaming services while running large updates and patches.


Related articles: 
Windows 8.1 Upgrade not in Windows Store
Delete Windows.old after upgrading to Windows 8.1

Related links:
Official Microsoft Update History.  Use this to search for manual KB downloads: 
https://support.microsoft.com/en-us/help/4018124/windows-10-update-history?ocid=update_setting_client


No comments:

Post a Comment

Comments are moderated and published upon review.