When does error 0XC00D2AFA show up?
You'll see this error when installing Windows Media Center on Windows 8 or 8.1 Pro. It happens right after the installer says "Installation was not successful and some file cleanup is not complete." The error code is NS_E_REBOOT_RECOMMENDED (0XC00D2AFA). Usually the trigger is a previous failed install of the Media Center pack, or you tried to install it twice without rebooting in between. I've seen it on Dell and HP machines that came with Windows 8 and people later tried to add Media Center for DVD playback.
Root cause
The installer from Microsoft leaves behind a staging folder when it fails. That folder has temp files that the new install sees as pending cleanup. It's not a big deal – just a flag that says "hey, reboot me first." But the error says "reboot recommended" and then doesn't let you proceed until you actually clean up manually. The root cause is that the Windows Media Center package download gets interrupted or corrupted, and the Windows Package Manager (DISM) doesn't clear its own mess.
Fix step by step
- Reboot your PC – sounds stupid, but half the time it clears the pending flag. Do a full restart, not shutdown and start. On Windows 8, hold Shift while clicking Restart to force a full reboot.
- Delete the temp folder – open File Explorer. Navigate to
C:\Windows\Temp. Look for a folder named something like{D5D4F8C0-...}orMediaCenter. Delete it. If you get a permission error, just skip that file – it's not the culprit. - Clean up using DISM – open Command Prompt as Administrator. Type:
dism /online /cleanup-image /checkhealth
Then run:
dism /online /cleanup-image /startcomponentcleanup
This tells Windows to drop any pending package operations. Wait for it to finish, it can take a minute or two. - Remove any leftover install files – go to
C:\Windows\ServiceProfiles\LocalService\AppData\Local\Tempand delete everything inside. Don't worry if you can't delete some files – the ones you can't delete are locked by the system and safe to leave. - Restart again – yes, another reboot. This time it will apply any pending cleanup.
- Install Media Center fresh – download the installer again from Microsoft's site (if you're on 8.1, it's part of the Pro Pack). Run it. It should go through with no error.
Still not working?
If that didn't fix it, check if you're running a genuine copy of Windows. Some pirated builds block Media Center components. Also make sure you're on Windows 8 or 8.1 Pro – the Pro Pack requires Pro edition, not Core. You can check in System Properties (Win + Pause/Break). If you see "Windows 8 Core" or "Windows 8.1 with Bing", you can't install Media Center at all – you'd need to upgrade to Pro first.
Another thing – the error can also happen if your system drive is low on space. The installer needs about 2GB free. Run Disk Cleanup (cleanmgr) and clear temporary files. If that doesn't free enough, uninstall some programs or move personal files to another drive.
I've seen this error on maybe 30 machines over the years. In 90% of cases, steps 1-3 fix it. The remaining 10% needed a fresh Windows install – but that's rare. Don't bother with registry edits or third-party cleaners; they don't help here. Just reboot, delete the temp folder, and run DISM. You'll be fine.