NS_E_INVALID_KEY (0XC00D0042) Windows Media DRM fix
This error pops up when Windows Media Player can't verify a DRM license key. Usually happens after reinstalling Windows or upgrading to a new version.
You're trying to play a song or video in Windows Media Player and instead of music you get this error: NS_E_INVALID_KEY (0XC00D0042) - The specified key is not valid. The playback just stops. This usually happens after you've reinstalled Windows, upgraded from Windows 7 to 10, or moved media files from an old computer to a new one. It's almost always a DRM (Digital Rights Management) license issue — the license that came with the file doesn't match what your system expects.
Root cause — what's actually broken
Windows Media Player uses a hidden folder called DRM to store licenses for protected content. When you reinstall Windows or upgrade, that folder can get corrupted or lose sync with the media files. The player then can't find the right key, and throws 0XC00D0042. Sometimes it's just an old license expired, but 90% of the time it's a corrupted DRM store.
Don't bother reinstalling Windows — that's overkill. The fix is simpler than that.
Fix it in 4 steps
- Close Windows Media Player completely. Check Task Manager to make sure it's not running in the background.
- Clear the DRM folder. Press Win + R, type
%windir%\ServiceProfiles\LocalService\AppData\Local\Microsoft\and hit Enter. Look for a folder namedDRM. Delete everything inside it — don't delete the folder itself, just its contents. If you can't see the folder, enable hidden files in File Explorer. - Reinstall Windows Media Player. Go to Settings > Apps > Optional Features. Find Windows Media Player, uninstall it, then restart your PC. After reboot, go back to Optional Features and reinstall it. This forces Windows to rebuild the DRM store fresh.
- Reacquire licenses for your media. Open Windows Media Player, go to Tools > Options > Privacy and check Acquire licenses automatically for protected content. Then try playing the file again. The player will connect to the license server and download a new key.
If the file was downloaded from a store like Amazon or iTunes, you may need to re-download it. Those stores bind licenses to your account, and the reacquire step usually handles it.
Still broken? Check these
- Run as administrator — sometimes permissions on the DRM folder get locked. Right-click Windows Media Player and choose Run as administrator.
- Check file ownership — if the media file is on a network drive or external USB, copy it to your local desktop first. Network paths can confuse DRM.
- Update Windows — outdated Media Player versions have known bugs with DRM. Go to Settings > Update & Security and install all pending updates.
- Third-party codec packs — K-Lite or CCCP can sometimes mess with DRM. Uninstall them temporarily to test.
If none of that works, the file itself might be legitimately expired. Some DRM licenses have a time limit. In that case, you're stuck — either buy a new copy or find an unprotected version. But that's rare. Clear the DRM folder, reinstall the player, and you'll fix 0XC00D0042 19 times out of 20.
Was this solution helpful?