Quick answer for pros: Run DISM /Online /Cleanup-Image /RestoreHealth as admin, then sfc /scannow. If that doesn't cut it, check HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing for orphaned registry keys related to the feature ID.
What's going on with error 0x00000646?
I've seen this one pop up mostly during Windows updates or when you're trying to install a feature pack—like the .NET Framework 3.5 or the Windows Media Player. The OS is looking for a specific feature ID (a GUID) in its internal registry, but it can't find it. Maybe an update failed halfway, or a previous uninstall left a dangling reference. Either way, Windows gets confused and throws ERROR_UNKNOWN_FEATURE at you.
This error tripped me up the first time too, back when I was running a help desk blog. A user had tried to install the Windows 10 Language Pack, and the error stopped them cold. The fix wasn't obvious, but it's repeatable.
Fix it: Step-by-step
Step 1: Run DISM and SFC (this fixes 80% of cases)
- Open Command Prompt as Administrator (right-click Start > Command Prompt (Admin) or Terminal (Admin)).
- Run this command and wait for it to finish—can take 10-15 minutes:
DISM /Online /Cleanup-Image /RestoreHealth - After that, run:
sfc /scannow - Reboot your machine. If the error is gone, you're done.
Step 2: Check the Component Based Servicing registry
If the error persists, the issue is likely a stale registry key. This is more hands-on, so back up your registry first (File > Export in regedit).
- Press
Win + R, typeregedit, hit Enter. - Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing - Look under
Packagesfor a key that references the feature ID in your error. Usually it's a long GUID like{...}that matches what the error log shows. If you can't find your error log, checkC:\Windows\Logs\CBS\CBS.logand search for "0x00000646"—it'll point to a package name. - If you find a package that's flagged as "staged" or "installed" but you know it's broken, right-click it and delete it. Be careful: Only delete packages you're sure are orphaned. If you're unsure, move it to a backup folder in regedit first (File > Export).
- Reboot and try the update or install again.
Alternative fixes if the main one fails
Use the Windows Update Troubleshooter
It's often ignored, but it can reset the update components and kill stale feature references. Go to Settings > Update & Security > Troubleshoot > Additional troubleshooters > Windows Update. Run it, reboot, try again.
Reset Windows Update components manually
If the troubleshooter doesn't work, run these commands in an admin Command Prompt (close all browsers first):
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 catroot2.old
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
Then run DISM and SFC again from Step 1.
In-place upgrade repair
If nothing else works, download the Windows 10 or 11 Media Creation Tool, run it, and choose "Upgrade this PC now." This will reinstall the OS while keeping your files and apps. It's a nuclear option but it fixes even the most stubborn feature registration issues.
How to prevent this from happening again
The main culprit is interrupted updates—shutting down during a Windows Update or having a hard crash while installing a feature. Always let updates complete fully, and avoid turning off your PC during the "Getting Windows ready" screen. Also, keep your system drive healthy: run chkdsk /f once a month to catch disk errors that can corrupt the component store.
If you're a sysadmin managing multiple machines, consider enabling Feature-on-Demand via Group Policy rather than manually installing feature packs—it's more reliable and less likely to leave orphaned registry entries.
One last thing: if this error shows up specifically when enabling .NET Framework 3.5, use DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\sources\sxs (replace D: with your Windows installation media drive). This bypasses the registry entirely.