sodcalculator

10 Tech How-To

Fix Error 0x80040c97: Causes & Solutions

Guide 10-51421 · Updated · Step by step

Error 0x80040c97 is a Windows Update or Microsoft Store error that typically means the update service cannot write or read a required file, often due to corrupted cache, permission issues, or a conflicting third-party program. The most reliable fix is to run the built-in Windows Update Troubleshooter, then clear the SoftwareDistribution folder, and if that fails, reset the Windows Update components via Command Prompt. Below is a step-by-step guide, plus background on why this error appears and how to prevent it.

What Does Error 0x80040c97 Mean?

This error code is part of the 0x80040cxx range, which Windows uses to indicate a problem with the update agent’s ability to access or process update files. In practice, users see it when trying to install a Windows Update, a driver update, or an app from the Microsoft Store. The error text usually says “Something went wrong” or “There were problems installing some updates,” but the code itself points to a file system or permission failure, not a problem with the update itself.

Common triggers include:

  • Corrupted files in the SoftwareDistribution or Catroot2 folders
  • Insufficient disk space or a full system drive
  • Antivirus or firewall software blocking the update service
  • System file corruption (DLL or registry issues)
  • Windows Update service not running or set to manual

Before You Start: Basic Checks

Try these quick checks first, as they resolve a surprising number of cases:

  1. Restart your PC. A simple reboot clears temporary locks on update files.
  2. Check disk space. Open File Explorer, right-click your system drive (usually C:), and select Properties. Ensure you have at least 10 GB free. If not, delete temporary files or move large files to another drive.
  3. Run Windows Update Troubleshooter. Go to Settings > System > Troubleshoot > Other troubleshooters, select Windows Update, and click Run. This tool automatically detects and fixes common update issues.
  4. Temporarily disable third-party antivirus. If you use a third-party AV, disable its real-time protection for a few minutes and try the update again. Re-enable it immediately after.

Step-by-Step Fix: Reset Windows Update Components

If the basic checks don’t work, the most thorough fix is to reset the Windows Update components manually. This clears corrupted cache and restores default permissions. You’ll need to run Command Prompt as administrator.

  1. Press Windows + X and select Terminal (Admin) or Command Prompt (Admin).
  2. Stop the relevant services by typing these commands, pressing Enter after each:
    net stop wuauserv
    net stop cryptSvc
    net stop bits
    net stop msiserver
  3. Rename the update cache folders (this forces Windows to recreate them):
    ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
    ren C:\Windows\System32\catroot2 Catroot2.old
  4. Restart the services:
    net start wuauserv
    net start cryptSvc
    net start bits
    net start msiserver
  5. Close the Command Prompt and restart your PC. Then try Windows Update again.

If you get an “access denied” error when renaming, make sure you ran the Command Prompt as administrator and that no update is currently running.

Additional Fixes: System File Checker and DISM

Corrupted system files can also cause this error. Windows includes two tools to repair them:

  • System File Checker (sfc /scannow) – Scans protected system files and replaces corrupted ones. Run it in an elevated Command Prompt: sfc /scannow. It can take 15-20 minutes.
  • Deployment Imaging Service and Management Tool (DISM) – Repairs the Windows image itself. Run these commands in order (each may take several minutes):
    DISM /Online /Cleanup-Image /CheckHealth
    DISM /Online /Cleanup-Image /RestoreHealth

Run SFC first, then DISM if SFC reports issues it can’t fix. After both, restart and try updating again.

When to Use the Windows Update Reset Script

If the manual steps above seem daunting, Microsoft provides a supported script that automates the entire component reset. You can download it from the official Microsoft Support site (search for “Windows Update Reset script”). It performs the same steps as the manual method, plus a few extra checks. Always download it from a reputable source—preferably Microsoft’s own support page—and run it as administrator. This is a safe, official tool, not a third-party utility.

Preventing Future Occurrences

Once you’ve fixed the error, these habits reduce the chance of it returning:

  • Keep your system drive clean. Regularly run Disk Cleanup (search for “Disk Cleanup” in Start) and remove temporary files.
  • Don’t force-shut down during updates. Let updates finish; interrupting them can corrupt the cache.
  • Check for third-party conflicts. Some VPNs, proxy tools, or “PC optimizer” software can interfere with update services. Uninstall any that you don’t trust.
  • Update drivers manually if needed. Sometimes a specific driver update fails repeatedly. You can download it from the manufacturer’s website and install it manually, bypassing Windows Update.

Frequently Asked Questions

Will this error damage my computer?

No. Error 0x80040c97 is a software-level issue that prevents updates from installing. It doesn’t harm your files or hardware. The main risk is that your system misses important security updates, so fixing it promptly is recommended.

Can I just ignore this error?

You can, but it’s not advisable. Windows Update delivers critical security patches. Ignoring the error leaves your PC vulnerable. Also, the error may block other updates, so it’s best to resolve it.

Why does this happen after a major Windows update?

Major updates often change system files and permissions. If a previous update left behind corrupted cache or incomplete registry entries, the next update can fail with this error. The reset process clears those remnants.

Is it safe to delete the SoftwareDistribution folder?

Yes, but only when you rename it (as shown above) rather than delete it outright. Renaming allows Windows to recreate a fresh folder. If you delete it, Windows will also recreate it, but renaming is safer because it preserves the original for troubleshooting if something goes wrong.

What if none of these steps work?

If you’ve tried all steps and the error persists, consider using the Windows Media Creation Tool to perform an in-place upgrade (keep your files and apps). This reinstalls Windows while preserving your data. As a last resort, you can use the “Reset this PC” feature, but that removes your apps. Always back up important files before attempting either.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →