Microsoft Error: 0x80240022

Issue

A patch policy fails on a Windows device, and the "Patch Failed" email or the Activity Log entry ends with:

Error: 0x80240022, -2145124318
Error Source: FACILITY_WINDOWSUPDATE
Error Message: Operation failed for all the updates.

The same log entry usually shows one or more lines of the form Install failed with ResultCode 4 and HResult -2145124318 above the final error, and the run may finish as COMMAND TIMED OUT after repeated installation attempts.

Environment

  • Automox (current agent release)
  • Windows devices; patch policies installing Windows updates (cumulative, feature, or driver updates)
  • Console areas: Activity Log, device Software page

Overview

Error 0x80240022 is Windows Update's WU_E_ALL_UPDATES_FAILED result: every update attempted in the run failed to install. It is an aggregate code — Windows Update raises it after the individual updates have already failed — so the fix is found by identifying why the individual updates failed, not by treating 0x80240022 itself. The decimal value -2145124318 seen in the per-update lines is the same code in a different form.

Because the installation is retried within the same run, these failures frequently end in a "Command timed out" result rather than a clean failure; the timeout is a symptom, not the cause.

Resolution

  1. Read the full Activity Log entry for the failed run, from the top:
    • Note which updates were being installed and any per-update error detail above the final 0x80240022 block.
    • If a single update repeatedly fails (for example, one cumulative update or one feature update), troubleshoot that update specifically.
  2. Reset the Windows Update components — the most common fix for this error:
    • Follow Windows Update Services Reset.
    • As a lighter first attempt, clear only the update cache: stop the Windows Update service in services.msc, delete the contents of %windir%\SoftwareDistribution\DataStore (this clears the update cache; it does not remove installed updates), then start the service again. If the error returns, perform the full reset.
  3. If the error persists after a reset, check whether security software is interfering:
    • Antivirus or endpoint-protection software blocking access to Windows Update working folders (notably %windir%\SoftwareDistribution) is a known cause — confirm those folders are excluded from real-time protection.
    • Review %windir%\Logs\CBS\CBS.log around the failure time to identify a blocked file or folder.
  4. For feature updates (for example, a Windows 11 version upgrade) that fail with this error:
    • Verify the device is eligible for the target release — hardware requirements, sufficient disk space, and no Microsoft compatibility hold — before retrying.
  5. Rescan the device and re-run the policy:

Notes

  • 0x80240022 means the updates failed — it does not mean the updates were already installed. A device that is already fully patched reports no applicable updates and does not produce this error.
  • One run can contain both third-party software and Windows updates; the 0x80240022 block applies to the Windows-update portion. Check the earlier lines of the entry for the result of any third-party installs in the same run.
  • For other Windows Update error codes seen in the Activity Log, see Common Windows Update Error Codes.
Was this article helpful?
0 out of 0 found this helpful