How To Resolve Windows Update Error 0x80240031

Lots of folks bump into error 0x80240031 when trying to install Windows updates. It’s kinda annoying because it stops updates from going through, and sometimes stuff like malware, bad configuration, not enough disk space, or corrupted system files are to blame. Finding a fix can feel like chasing your tail, especially since Windows has a habit of confusing the issue with vague error codes. Luckily, there are a bunch of things to try that have worked on different setups, so hopefully one will get your update back on track.

How to Fix Windows Update Error 0x80240031

Run the Windows Update Troubleshooter

  1. Hit Windows + I to open Settings.
  2. Navigate to Update & Security.
  3. Click on Troubleshoot, then go to Additional troubleshooters.
  4. Click on Windows Update, then hit Run the troubleshooter.
  5. Follow the prompts — it might ask you to restart or do some quick repairs. Honestly, this is the first thing that should be tried because it’s simple and often fixes common update hiccups. On some machines, it fails the first time, then works after a reboot or two, so if it doesn’t help the first go, don’t give up just yet.

Running this can often fix the error, especially if the problem is something simple like stuck Windows update files or services misbehaving. Plus, it can tackle other update issues like error 0xc007000d that crop up unexpectedly.

Perform a Clean Boot

  1. Press Windows + R to open the Run box.
  2. Type msconfig and hit Enter. This opens System Configuration.
  3. Go to the Services tab, check Hide all Microsoft services, then click Disable all. This stops most non-essential background apps that might interfere with updates.
  4. Switch over to the Startup tab and click Open Task Manager.
  5. In Task Manager, disable all enabled startup items one by one; they usually won’t be needed during troubleshooting.
  6. Close Task Manager, go back to System Configuration, click Apply and then OK.
  7. Finally, restart your PC. Performing a clean boot means Windows loads only essential services, which can help uncover if some third-party software is blocking updates. Sometimes, on some setups, a conflicting app or driver causes errors like 0x80240031, and this method helps isolate that.

Reset Windows Update Components

  1. Open Command Prompt as administrator: type cmd in the search bar, right-click, and choose Run as administrator.
  2. Type these commands one by one; hit Enter after each:
    net stop bits net stop wuauserv net stop cryptsvc net stop msiserver

    This stops the update services — kinda weird, but if they’re stuck, these stop commands are necessary to do a clean reset.

  3. Next, delete the update cache by running:
    Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"

    If that folder isn’t on your system, ignore that part — it’s standard stuff.

  4. Rename the SoftwareDistribution and Catroot2 folders—this forces Windows to create new, clean ones:
    • Ren %systemroot%\SoftwareDistribution DataStore.bak
    • Ren %systemroot%\SoftwareDistribution Download.bak
    • Ren %systemroot%\system32\catroot2 catroot2.bak
  5. Reset the update services with these commands:
    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)

    These are permissions tweaks, basically telling Windows update services to be less cranky. On some systems, these permissions fail initially but tend to work after a few reboots or retries.

  6. Back to Command Prompt, switch to the System32 folder:
    cd /d %windir%\system32
  7. Re-register relevant DLL files to fix potential corruptions:
    regsvr32.exe atl.dll regsvr32.exe urlmon.dll regsvr32.exe mshtml.dll regsvr32.exe shdocvw.dll regsvr32.exe browseui.dll regsvr32.exe jscript.dll regsvr32.exe vbscript.dll regsvr32.exe scrrun.dll regsvr32.exe msxml.dll regsvr32.exe msxml3.dll regsvr32.exe msxml6.dll regsvr32.exe actxprxy.dll regsvr32.exe softpub.dll regsvr32.exe wintrust.dll regsvr32.exe dssenh.dll regsvr32.exe rsaenh.dll regsvr32.exe gpkcsp.dll regsvr32.exe sccbase.dll regsvr32.exe slbcsp.dll regsvr32.exe cryptdlg.dll regsvr32.exe oleaut32.dll regsvr32.exe ole32.dll regsvr32.exe shell32.dll regsvr32.exe wuaueng.dll regsvr32.exe wuaueng1.dll regsvr32.exe wucltui.dll regsvr32.exe wups.dll regsvr32.exe wups2.dll regsvr32.exe wuweb.dll regsvr32.exe qmgr.dll regsvr32.exe qmgrprxy.dll regsvr32.exe wucltux.dll regsvr32.exe muweb.dll regsvr32.exe wuwebv.dll regsvr32.exe initpki.dll regsvr32.exe wuapi.dll
  8. Reset Winsock just to be sure network settings aren’t causing issues:
    netsh winsock reset net start bits net start wuauserv
  9. Finally, restart your PC to make all these changes stick.

Run System File Checker & DISM

  1. Open Command Prompt as admin again.
  2. Type:
    DISM /Online /Cleanup-Image /CheckHealth DISM /Online /Cleanup-Image /ScanHealth DISM /Online /Cleanup-Image /RestoreHealth

    and press Enter each time. These scans try to fix corrupt system files used by Windows Update. Sometimes, the first command hangs or says nothing’s wrong, but just running them is worth it.

  3. Once the DISM commands finish, run the sfc /scannow to check system files integrity. Expect it to take a few minutes; don’t cancel it because it might fix some hidden problems.
  4. Reboot after everything’s done, and hopefully, those pesky update errors go away.

Running a DISM scan is kinda like giving Windows a deep clean — it often uncovers or fixes issues that block updates from installing correctly.

Fix Hard Drive Errors

  1. Back in Command Prompt with admin rights, run:
    chkdsk /f C:

    This scans and repairs bad sectors or filesystem issues—another potential culprit behind update failures.

  2. Type Y when it asks if you want to schedule the disk check on next reboot, then restart your PC. The scan might take a little while, but it’s often worth it if disk errors are causing the update error.

Run Automatic Repair

  1. Open Settings with Windows + I, then go to Update & Security.
  2. Click on Recovery in the left menu.
  3. Under Advanced Startup, click Restart Now.
  4. When the PC restarts, pick Troubleshoot, then Advanced options.
  5. Select Automatic Repair — this will attempt to fix issues preventing updates from completing. Sometimes, this is a quick fix, especially if there’s a glitch misfiring.

Perform a Fresh Windows Install

Create Bootable Media

  1. Head over to the Microsoft Windows 10 download page.
  2. Download the Media Creation Tool and run it after it’s downloaded.
  3. Choose to Create installation media (USB flash drive, DVD, or ISO). Pick language, edition, and architecture, then select USB flash drive—since that’s easier to make bootable.

Install Windows 10

  1. Plug the USB in, restart the PC, and hit the BIOS key (like F2, F12, ESC, or DEL) right after powering on.
  2. Set the boot order to prioritize the USB drive, then save and exit.
  3. Follow the prompts to install Windows, choosing Custom: Install Windows only (Advanced) when asked to do a clean install. Be mindful, deleting partitions will wipe everything — so make sure to back up if there’s anything valuable.

Finish Setup & Updates

  1. After Windows installs, pick your region, keyboard layout, connect to Wi-Fi, and sign in with a Microsoft account or create a new one.
  2. Once you’re inside, go to Settings > Update & Security > Windows Update and hit Check for updates. This can sometimes finalize the process and get rid of annoying errors like 0x80240031.

Honestly, if all else fails, a clean install might be the last resort — but it’s brutal, and you should back up everything first. Still, it clears out all the junk and corrupt stuff that might be causing issues. Usually, after doing that, updates go through without fuss.

Summary

  • Run the Windows Update Troubleshooter first — it’s quick and usually helpful.
  • Perform a clean boot to diagnose software conflicts.
  • Reset Windows Update components via command line.
  • Run SFC and DISM scans for corrupted system files.
  • Check your disk for errors with chkdsk.
  • Try Automatic Repair if Windows can’t start normally.
  • If nothing works, consider a clean installation after backing up your stuff.

Wrap-up

Fixing error 0x80240031 can be a pain, but going through these steps covers most bases. Sometimes, it’s just a weird glitch that clears up after a reboot or a permissions tweak, but other times, more involved fixes like resetting components or reinstalling Windows are needed. Good luck, and fingers crossed this helps someone salvage their update process without pulling hair out. Worked on multiple setups — hope it helps yours too.