This article explains how to install Windows Update whenever your Windows Update service is broken. Which seems to occasionally happen. And while you can run a ton of scripts to fix it (and a lot of guides online just tell you to click “Check for updates” manually, which is kind of funny to me, but ok), the actual thing that worked for me was way simpler.
Read on to find out more and possibly laugh at me.
Anyway.
Background
I have a Windows PC that I don’t use often. Some people would probably call it a “gaming rig”, but be that as it may, I have not had the time to use it very often. But a few days ago, I wanted to open it again.
And open it did. But as soon as I started using it, I noticed Windows was quite outdated. Like 9 months outdated.
That’s… Not odd, no, it’s what I expected, really. But I’ll get the system updated, because who knows, maybe Microsoft has added some new ads or other cool monetization options in the meantime?
So I headed to Windows Update and hit “Check for updates”.
First – nothing.
Then, after checking back later – errors. After a reboot – more errors.
What gives?
Problem
So when you’re trying to run Windows Update, you run into all kinds of nondescriptive errors. I’ll actually add them when I have the time, but the main point is your Windows Update is down and rebooting does not help.
I never figured out what was the reason. Windows Update had just broken down on it’s own. But I needed to figure out how to fix it, just in case.
So – what do?
Solution
A couple of different ways to solve this. And as usual, they’re listed below roughly in the order of drasticness.
How to install latest updates when Windows Update is borked?
- Install the latest updates with PowerShell
Here’s what to run in PowerShell:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-Module -Name PSWindowsUpdate -Force
Import-Module -Name PSWindowsUpdate
Get-WindowsUpdate -AcceptAll -Install -AutoReboot
And there you (might) go!
Oh, it didn’t work, either? Well, on you go then… - Windows Update Catalog
I have never had luck with this option but in theory you can navigate to https://www.catalog.update.microsoft.com/Home.aspx and just pick and choose which updates to install.
I don’t know how this works for someone if Windows Update is down, but I guess it’s still worth mentioning. - Download Windows installer
This step – which finally worked for me – I only did after all of the script steps, and that was dumb. It’s really quick and easy, so please do this first. You’ll need to download Windows Update Assistant and see if it can install the latest version of Windows.
You can get it from the same page as you get the Windows Media Creation Tool, and just hit the big “Update now” button and you should get the updater.
I have Windows 10 (because I like to be able to move my task bar) so that’s what I went with. Links to download pages at the bottom of the page. - Weird command line hacks
If you really want to, you can do the long dance below to completely reset Windows Update and possibly get Windows Updates to be downloaded again.
I did – and after a few hours, Windows Update finally ran again. But only to encounter a new error…
So I don’t think you should do this. But here are the commands anyway:net stop bits
net stop wuauserv
net stop appidsvc
net stop cryptsvc
Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\*.*"
rmdir %systemroot%\SoftwareDistribution /S /Q
rmdir %systemroot%\system32\catroot2 /S /Q
sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU) sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
cd /d %windir%\system32
regsvr32.exe /s atl.dll
regsvr32.exe /s urlmon.dll
regsvr32.exe /s mshtml.dll
regsvr32.exe /s shdocvw.dll
regsvr32.exe /s browseui.dll
regsvr32.exe /s jscript.dll
regsvr32.exe /s vbscript.dll
regsvr32.exe /s scrrun.dll
regsvr32.exe /s msxml.dll
regsvr32.exe /s msxml3.dll
regsvr32.exe /s msxml6.dll
regsvr32.exe /s actxprxy.dll
regsvr32.exe /s softpub.dll
regsvr32.exe /s wintrust.dll
regsvr32.exe /s dssenh.dll
regsvr32.exe /s rsaenh.dll
regsvr32.exe /s gpkcsp.dll
regsvr32.exe /s sccbase.dll
regsvr32.exe /s slbcsp.dll
regsvr32.exe /s cryptdlg.dll
regsvr32.exe /s oleaut32.dll
regsvr32.exe /s ole32.dll
regsvr32.exe /s shell32.dll
regsvr32.exe /s initpki.dll
regsvr32.exe /s wuapi.dll
regsvr32.exe /s wuaueng.dll
regsvr32.exe /s wuaueng1.dll
regsvr32.exe /s wucltui.dll
regsvr32.exe /s wups.dll
regsvr32.exe /s wups2.dll
regsvr32.exe /s wuweb.dll
regsvr32.exe /s qmgr.dll
regsvr32.exe /s qmgrprxy.dll
regsvr32.exe /s wucltux.dll
regsvr32.exe /s muweb.dll
regsvr32.exe /s wuwebv.dll
netsh winsock reset
netsh winsock reset proxy
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc
Restart the computer and try running Windows Update again. - Check your Windows installation’s health
This is kind of a classic – running sfc (System File Checker) and DISM (Deployment Image Servicing and Management) will help Windows verify all system files are ok.
Running these is very hands-off, but takes a while. So you might not want to run them while you have something important to do
Anyway – here’s what to run:dism.exe /Online /Cleanup-image /Restorehealth
sfc /scannow
After restarting, try again.
References
- Download links:
- https://www.microsoft.com/en-in/software-download/windows10
- https://www.microsoft.com/en-in/software-download/windows11
- Useful sources:
- https://www.partitionwizard.com/partitionmagic/powershell-windows-update.html
- https://pureinfotech.com/install-updates-manually-windows-11/
- M365 Copilot claiming “You have turned off web search in the work mode”? Easy fix! - November 19, 2024
- “Performing cleanup” – Excel is stuck with an old, conflicted file and will never recover. - November 12, 2024
- How to add multiple app URIs for your Entra app registration? - November 5, 2024