Fix it now
0x80242006 is the update handler refusing a package because the metadata that describes it is invalid. 0x80240022 is not a diagnosis at all: it reports that every update in the operation failed. Microsoft’s mitigation for the first is to discard the local update store so the client fetches fresh metadata and content.
net stop wuauserv
net stop bits
net stop cryptsvc
ren %systemroot%\SoftwareDistribution\DataStore DataStore.bak
ren %systemroot%\SoftwareDistribution\Download Download.bak
ren %systemroot%\System32\catroot2 catroot2.bak
net start cryptsvc
net start bits
net start wuauserv
- Restart the machine first if Windows is asking for one. For 0x80242014 that is the entire published fix: the post-restart phase is still running and restarting is what finishes it.
- Scan again from Settings, then Windows Update. The first scan after the rename is slow because the store is being rebuilt from nothing.
- If 0x80240022 comes back, look at your security software before anything else. Microsoft names antivirus blocking access to folders such as SoftwareDistribution as the most common cause, and says CBS.log identifies which file or folder is being protected.
- If one named KB still fails, fetch that KB from the Microsoft Update Catalog and install it by hand.
Renaming those three folders discards update history and cached downloads. It uninstalls nothing and it does not touch activation.
If the update installs after that you are done. If it does not, the next section explains which of the five codes you are actually holding.
Why it happens
Windows Update does not install anything itself. It downloads content, then hands each package to a handler, which for a cumulative update means the component-based servicing stack. Between the two there is a contract: the metadata describing the package has to be something the local handler can act on, and the content on disk has to be what that metadata says it is. Four of the five codes here are the handler reporting on that contract; the fifth is a summary that reports on nothing at all.
0x80242006 is WU_E_UH_INVALIDMETADATA. Microsoft’s wording is that a handler operation could not be completed because the update contains invalid metadata, and the mitigation it publishes is to rename the DataStore and Download folders under SoftwareDistribution along with catroot2. That tells you where Microsoft thinks the bad metadata usually lives: in the client’s own cache rather than in the package on the server.
0x80240022 is WU_E_ALL_UPDATES_FAILED, and it is a count rather than a cause. On a machine offered six updates in one pass it says six things went wrong and nothing about any of them. Microsoft’s own note against it is that there are multiple root causes and the most common is security software blocking access to folders such as SoftwareDistribution, with CBS.log naming the protected file. Treat the code as a pointer to the per-update results in update history, never as the answer.
The two post-restart codes describe the other end of the same install. A cumulative update stages its files while Windows is running and completes during a restart with the operating system partly offline. 0x80242014 says that phase is still in progress. 0x80242016 says it finished in a state the agent did not expect. 0x8024200C is the odd one out and the most useful: the handler is telling you it cannot use the delta-compressed content it was given and needs the full self-contained package instead.
The post-restart phase has not finished
You have this one if 0x80242014 or 0x80242016, and Windows keeps asking to restart or re-offers the same update after restarting.
- Restart from the Start menu rather than by holding the power button, and let the configuring screens run without interrupting them. Microsoft’s published mitigation for 0x80242014 is exactly this.
- Check whether anything is genuinely stuck:
DISM /Online /Get-Packages /Format:Tableand look for a package in an Install Pending state. - Check update history before repairing anything. A machine that finished the phase reports the update as installed even though the code appeared.
Do not go straight to editing pending servicing state. Two clean restarts settle most of these.
The client is holding invalid metadata
You have this one if 0x80242006 on more than one update, and the same updates install without trouble on a machine next to it.
- Run the block at the top of this page, which is Microsoft’s published mitigation for this code.
- Scan again and let the first scan finish even if it takes several minutes.
- If the machine scans against WSUS, check whether other clients of the same server fail identically. That moves the problem to the server’s copy of the metadata.
Security software is holding the update folders
You have this one if 0x80240022 across every offered update, and the failure survives a store rebuild.
- Read
%windir%\Logs\CBS\CBS.logand find the file or folder that could not be accessed. - Exclude the update folders from real-time scanning, or pause protection long enough to test, if your policy allows it.
- Retry the scan and watch whether the per-update results in update history change from failure to success.
Microsoft names this as the most common root cause of 0x80240022. It is worth checking before you rebuild anything.
Delta content cannot be applied on this machine
You have this one if 0x8024200C, usually on a WSUS-managed client, and the same KB installs cleanly when downloaded from the catalogue.
- Install the update from the Microsoft Update Catalog. That supplies the full self-contained package, which is what the handler asked for.
- Check any proxy or inspection device in the path. Delta content relies on partial-range requests and a device that rewrites or refuses them breaks it quietly.
- On WSUS, review whether express installation files are enabled and whether they are worth keeping given the path clients take to the server.
The component store underneath the handler is damaged
You have this one if 0x80242006 together with DISM reporting corruption, or repeated failures across unrelated updates.
- Confirm rather than assume:
DISM /Online /Cleanup-Image /ScanHealth. - Repair it:
DISM /Online /Cleanup-Image /RestoreHealth. Where the machine cannot reach Windows Update, point it at a matching image with/Source:and add/LimitAccess. - Follow with
sfc /scannow, restart, and retry the update.
Full reference
Reading the five codes as one sequence
| Code | Where in the install it fires | What to do first |
|---|---|---|
0x80242006 |
Before the handler touches the component store | Rebuild the local update store |
0x8024200C |
When the handler is handed delta content | Install the full package from the catalogue |
0x80242014 |
During the restart phase | Restart and let it finish |
0x80242016 |
After the restart phase | Check history, then repair the component store |
0x80240022 |
At the end of the whole operation | Read the per-update results; check security software |
Commands that are worth running, and what each proves
| Command | What it tells you |
|---|---|
DISM /Online /Get-Packages /Format:Table |
Whether any package is sitting in Install Pending |
DISM /Online /Cleanup-Image /ScanHealth |
Whether the component store is actually damaged |
DISM /Online /Cleanup-Image /RestoreHealth |
Repairs it, from Windows Update or from a source you name |
sfc /scannow |
Checks and repairs protected system files |
Get-HotFix |
Confirms a KB number is present after the install |
Get-WindowsUpdateLog |
Produces a readable WindowsUpdate.log from the trace files |
Where the evidence lives
%windir%\Logs\CBS\CBS.logandCBS.persist.log– what the servicing stack did, and the file or folder it could not reach. This is the log Microsoft points at for 0x80240022.C:\Windows\Logs\WindowsUpdate– the update client’s own trace files.Get-WindowsUpdateLogconverts them into a static readable copy; run it again if you want a fresh one.- Settings, then Windows Update, then Update history – the per-update result codes hiding behind 0x80240022.
%windir%\Logs\DISM\dism.log– what a repair attempt did and why it stopped.
The servicing stack question, answered properly
The old advice for a cumulative update that fails on one machine and installs everywhere else was to hunt down the matching servicing stack update and install it first. That has been out of date since February 2021, when Microsoft began shipping the latest servicing stack update inside the cumulative update as a single combined payload for Windows Update, WSUS and the Microsoft Update Catalog, starting with KB4601382 on Windows 10 version 2004 and later.
So the sequencing problem now only shows up on machines that have been offline long enough to be several combined packages behind, or on managed estates that still approve standalone servicing stack updates alongside cumulative ones. If you run WSUS or Configuration Manager, check whether your approval rules still assume the old two-package model; approving both in the same window is what produces the reproducible single-KB failure people still blame on the servicing stack.
Editing pending.xml or deleting servicing entries under Component Based Servicing can leave a machine unable to boot. If you get to the point of considering it, take a full backup or a snapshot first, and treat a reinstall as the cheaper option on a single workstation.
When it is one KB and only one KB
- Note the KB number from update history and search for it in the Microsoft Update Catalog.
- Download the package that matches the machine’s architecture and Windows version.
- Install it directly and watch whether it succeeds. If it does, the fault is in delivery rather than in the package, and the delivery path is what needs attention.
- If it fails the same way by hand, the fault is on the machine, and the component store repair above is the next step.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0x80242006 |
WU_E_UH_INVALIDMETADATA: a handler operation could not be completed because the update contains invalid metadata | Microsoft Learn |
0x80240022 |
WU_E_ALL_UPDATES_FAILED: the operation failed for all the updates. Microsoft names security software blocking folders such as SoftwareDistribution as the most common root cause | Microsoft Learn |
0x80242014 |
WU_E_UH_POSTREBOOTSTILLPENDING: the post-restart operation for the update is still in progress, so restart the device | Microsoft Learn |
0x80242016 |
WU_E_UH_POSTREBOOTUNEXPECTEDSTATE: the state of the update after its post-reboot operation completed is unexpected | Microsoft Learn |
0x8024200C |
WU_E_UH_FALLBACKTOSELFCONTAINED: the handler should download self-contained content rather than delta-compressed content | Microsoft Learn |
Confirm the fix worked
- Update history shows the KB as successfully installed rather than as a failure with a code beside it.
Get-HotFixlists the KB number with today’s date.DISM /Online /Get-Packages /Format:Tableshows nothing left in Install Pending.- A further restart does not return the machine to a configuring screen or re-offer the same update.
- A second, unrelated update installs normally, which proves you fixed the path rather than one file.
Questions people ask about this
Does 0x80240022 ever mean anything on its own?
No. It is the result of an operation that covered several updates and reports that all of them failed. The useful codes are the per-update ones in update history. Microsoft does add one hint: multiple root causes are possible and the most common is antivirus blocking access to folders such as SoftwareDistribution, which CBS.log will show you.
Is renaming SoftwareDistribution safe?
Yes, and it is what Microsoft publishes as the mitigation for 0x80242006. You lose update history and any cached downloads. Nothing is uninstalled, activation is untouched, and the folders rebuild themselves on the next scan.
Do I still need to install the servicing stack update first?
Usually not. Since February 2021 the cumulative update carries the servicing stack update in the same payload. It matters again only for machines that are many months behind, or where approval rules on a managed estate still separate the two.
Is installing the KB from the catalogue a fix or a workaround?
For one update it is a real fix, and it is also the cleanest test of where the fault is. If every month needs the same treatment, the delivery path is the thing that is broken, not the individual updates.
Do I need to buy anything to clear these codes?
No. Every tool involved ships with Windows and the machine is already licensed. If activation is failing as well, that is a separate problem with its own codes.
