This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
computing:windows:windows_update [2017/12/16 09:44] gcooper |
computing:windows:windows_update [2022/07/03 14:40] (current) gcooper |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Fixing Troublesome Windows Updates ====== | ====== 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: '' | ||
+ | |||
+ | ===== CLI ===== | ||
+ | |||
+ | The first thing to try if Windows Updates fail is: | ||
+ | |||
+ | < | ||
+ | sfc /scannow | ||
+ | </ | ||
+ | |||
+ | If it doesn' | ||
+ | |||
+ | < | ||
+ | chkdsk /x /f /r | ||
+ | y | ||
+ | shutdown now -t 0 | ||
+ | </ | ||
+ | |||
+ | then: | ||
+ | |||
+ | < | ||
+ | dism /online / | ||
+ | sfc /scannow | ||
+ | shutdown now -t 0 | ||
+ | </ | ||
+ | |||
+ | <note tip>If Windows Update fails to install an update, try downloading the update from the Microsoft Update Catalog and installing it locally. | ||
+ | |||
+ | ===== 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 " | ||
+ | net Start BITS | ||
+ | net start CryptSvc | ||
+ | net start wuauserv | ||
+ | echo. | ||
+ | echo Task completed successfully... | ||
+ | echo. | ||
+ | PAUSE | ||
+ | </ | ||
===== Servers ===== | ===== Servers ===== | ||
Line 7: | Line 70: | ||
https:// | https:// | ||
- | - | + | - Stop the Windows Update service: |
- | - | + | - '' |
- | - | + | - Delete the Windows Update cache directory |
- | - | + | - '' |
- | - | + | - Restart the computer |
- | - | + | - It may require |
- | - | + | - Run Windows Update manually again |
+ | - It will fail almost instantly and offer to run a diagnostic tool | ||
+ | - Download the tool and allow it to run | ||
+ | - http:// | ||
+ | - The tool will find and fix some problems | ||
+ | - Reboot the server | ||
+ | - Wait a while, or you may get another error | ||
+ | - Run '' | ||
===== Workstations ===== | ===== Workstations ===== |