Table of Contents

Fixing Troublesome Windows Updates

Windows Update Missing from Settings

Edit the Windows Registry:

HKEY_LOCAL_MACHINE → SOFTWARE → Microsoft → Windows → CurrentVersion → Policies → Explorer

Delete the key: SettingsPageVisibility

CLI

The first thing to try if Windows Updates fail is:

sfc /scannow

If it doesn't complete, try something like:

chkdsk /x /f /r
y
shutdown now -t 0

then:

dism /online /cleanup-image /restorehealth
sfc /scannow
shutdown now -t 0
If Windows Update fails to install an update, try downloading the update from the Microsoft Update Catalog and installing it locally. https://www.catalog.update.microsoft.com

WUReset.bat Script

FIXME This didn't work on Windows Server 2016, but the concepts do.

Run as an administrator:

@ECHO OFF
echo Simple Script to Reset / Clear Windows Update
echo.
PAUSE
echo.
attrib -h -r -s %windir%\system32\catroot2
attrib -h -r -s %windir%\system32\catroot2\*.*
net stop wuauserv
net stop CryptSvc
net stop BITS
ren %windir%\system32\catroot2 catroot2.old
ren %windir%\SoftwareDistribution sold.old
ren "%ALLUSERSPROFILE%\application data\Microsoft\Network\downloader" downloader.old
net Start BITS
net start CryptSvc
net start wuauserv
echo.
echo Task completed successfully...
echo.
PAUSE

Servers

Windows Server 2012 R2

https://serverfault.com/questions/625332/windows-update-not-working-on-windows-2012-r2-standard

  1. Stop the Windows Update service:
    1. net stop wuauserv
  2. Delete the Windows Update cache directory C:\Windows\SoftwareDistribution
    1. Remove-Item -Recurse -Force C:\Windows\SoftwareDistribution
  3. Restart the computer
    1. It may require several restarts to get everything deleted from this directory
  4. Run Windows Update manually again
    1. It will fail almost instantly and offer to run a diagnostic tool
    2. Download the tool and allow it to run
  5. The tool will find and fix some problems
    1. Reboot the server
    2. Wait a while, or you may get another error
    3. Run Windows Update manually again

Workstations

Take these steps to reliably fix troublesome Windows Updates:

  1. Turn off automatic updating
    • Control Panel → Windows Updates → Change Settings → Never Check…
  2. Reboot
  3. Search the Internet for “Windows XX latest update client”
    • Where XX is your Windows version
  4. Download and install the latest update client for your version of Windows
  5. Install Windows Updates

Disable Auto-Updates


Search for Latest Update Client


Download the Latest Update Client


Install Windows Updates