Fix 0x800B0009 PERSIST_E_SIZEDEFINITE: Data Size Error
Error 0x800B0009 means Windows can't figure out how big some data is, usually during certificate or registry operations. Quick fix: clear the SoftwareDistribution folder and retry.
Quick Answer
Delete the contents of C:\Windows\SoftwareDistribution (stop Windows Update service first), then run sfc /scannow and DISM /Online /Cleanup-Image /RestoreHealth from an elevated Command Prompt.
What Actually Triggers This Error
I've seen 0x800B0009 pop up mostly during Windows Update failures, but also when someone's trying to install a certificate into the local machine store or running a backup tool that relies on volume shadow copy. The error code translates to "the size of the data could not be determined" — Windows is saying it can't read a registry value or a data blob that's supposed to have a fixed size. Usually this means some file in the SoftwareDistribution folder got corrupt, or a registry key under HKLM\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing has lost its size metadata. I had a client two weeks ago who got this trying to install a security update on a Windows 10 Pro machine that had been running non-stop for eight months. A reboot fixed nothing. The root cause: a stuck pending file rename operation from a previous failed update.
Step-by-Step Fix
- Stop the Windows Update service
Open Command Prompt as Administrator and run:
net stop wuauserv - Clear the SoftwareDistribution folder
Delete everything insideC:\Windows\SoftwareDistribution. Don't delete the folder itself. Use:
del /f /s /q C:\Windows\SoftwareDistribution\*.*
If some files are locked, boot into Safe Mode first. - Restart the service
net start wuauserv - Run System File Checker
sfc /scannow
Wait for it to finish. If it finds corrupted files, it will replace them from cache. - Run DISM
DISM /Online /Cleanup-Image /RestoreHealth
This fixes the component store itself. Takes 10-20 minutes. - Reboot and retry
If That Doesn't Work
Sometimes the corruption is deeper. Try these in order:
- Check registry permissions — Open Regedit, go to
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing. Right-click, Permissions, make sure SYSTEM and Administrators have Full Control. If permissions are jacked, it can block size reads. - Use the Windows Update Troubleshooter — Download from Microsoft's site, not the Settings app one. The standalone one is more thorough.
- Reset Windows Update components manually — There's an old script from Microsoft called "WindowsUpdateReset.cmd" that resets all the services, BITS, and cryptsvc. Run it as admin.
- Check certificate store — Run
certlm.mscand look for any certificates showing a red X or 0x800B0009 in details. If found, delete and re-import the cert.
Prevention Tips
Three things I tell every client after fixing this:
- Reboot at least once a week. Windows Update leaves temp files hanging around. A restart flushes them.
- Keep your disk healthy. Run
chkdsk /fevery few months. Bad sectors can corrupt update data. - Never force-shutdown during an update. That's how you get orphaned registry entries that cause errors like this.
Was this solution helpful?