
Windows Activation Error 0xC004F012: How to Fix It
You try to activate Windows and get:
“Windows can’t activate right now. Try activating again later. If that doesn’t work, contact support. Error code: 0xC004F012”
or, from Command Prompt, “The Software Licensing Service reported that the call failed because the value for the input key was not found.”
Your key is usually not the problem. Windows keeps its activation data in a small license store on your PC, and when that store is missing or damaged, activation fails with 0xC004F012. It often appears after a big Windows upgrade or a reset. The fix is to rebuild the license store and enter your key again.
Error 0xC004F012 means Windows could not read a value from its own license store (tokens.dat), which is usually missing or damaged after a major upgrade or reset. Run the Activation troubleshooter and enter your key again in Settings, System, Activation. If that fails, rebuild the license store from an admin Command Prompt: stop sppsvc, rename tokens.dat, start sppsvc, run slmgr /rilc, restart twice, then run slmgr /ipk with your key and slmgr /ato.
Watch: fix error 0xC004F012 step by step
Prefer watching? This video shows what 0xC004F012 means, how to check your edition, the Activation troubleshooter, re-entering your key, rebuilding the license store (net stop sppsvc, ren tokens.dat tokens.bar, net start sppsvc, slmgr /rilc) and phone activation with slui 4.
Watch on the KRBKeys YouTube channel →
Short on time? Watch the short version
The same fix in a quick vertical video made for phones. Open it on YouTube Shorts →
What does error 0xC004F012 mean?
The Software Protection service (sppsvc) stores your license information in a file called tokens.dat. When Windows asks that store for a value it needs and the value isn’t there, you get “the value for the input key was not found”: error 0xC004F012.
You usually see it in one of these situations:
- After a major upgrade or reset. A feature update, an in-place repair or an upgrade from Windows 10 to 11 can leave the license store incomplete.
- A damaged license store. A disk error, a cleanup tool or a crash during an update can corrupt
tokens.dat. - No usable key on the PC. The key was removed, or the key installed doesn’t match the edition.
- A digital license on another account. In Settings you may also see “Make sure you’re signed in with the same account linked to the digital license”.
Before you start, open Settings → System → About and check your Edition. A Pro key only activates Windows Pro, and a Home key only activates Windows Home. If they don’t match, see our guide to error 0xC004F050.
Fix 1: Run the Activation troubleshooter
- Make sure you’re connected to the internet.
- Go to Settings → System → Activation (on Windows 10: Settings → Update & Security → Activation).
- Click Troubleshoot and follow the steps. If you changed hardware recently, choose I changed hardware on this device recently and sign in with the Microsoft account linked to your license.
The troubleshooter only appears when Windows isn’t activated. If it doesn’t fix the error, go to Fix 2.
Fix 2: Enter your key again
In Settings: go to Settings → System → Activation, click Change product key, enter your 25-character key and click Next, then Activate.
Or in Command Prompt: click Start, type cmd, right-click Command Prompt and choose Run as administrator. Then run:
- Install your key:
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX - Activate online:
slmgr /ato - Check the result:
slmgr /xprshould say The machine is permanently activated.
If /ipk or /ato gives 0xC004F012 again, the license store itself needs rebuilding (Fix 3). New to these commands? Our guide to activating Windows with CMD explains each one.
Fix 3: Rebuild the license store (tokens.dat)
This is Microsoft’s own procedure for activation problems caused by a damaged license store. It doesn’t touch your files or apps, but it does reset activation, so have your product key ready before you start.
- Open Command Prompt as administrator.
- Stop the Software Protection service:
net stop sppsvc - Go to the license store folder:
cd %windir%\system32\spp\store\2.0 - Rename the old store (don’t delete it):
ren tokens.dat tokens.bar - Start the service again:
net start sppsvc - Reinstall the system license files:
cscript.exe %windir%\system32\slmgr.vbs /rilc. This takes a minute or two; click OK on any pop-ups. - Restart the PC twice.
- Open Command Prompt as administrator again and install your key:
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX, thenslmgr /ato.
Keep tokens.bar until Windows shows as activated. Microsoft also advises against using slmgr /upk here: to replace a key, use /ipk.
If net start sppsvc fails (for example with “Access is denied” or error 5), run sfc /scannow in the same window, restart, and try again.
Need a key to activate after the rebuild?
If your old key is lost or doesn’t match your edition, a genuine retail key activates directly with Microsoft.
- ✔ Windows 11 Pro keys are delivered instantly by email
- ✔ Windows 10 Pro keys usually arrive within 2–10 minutes
- ✔ Free help if activation doesn’t go through
Fix 4: Activate by phone
If online activation still fails, Windows can activate by phone with Microsoft’s automated system:
- Press Windows + R, type
slui 4and press Enter. - Choose your country or region and click Next.
- Call the number shown, enter the installation ID when asked, and type the confirmation ID you get back into the window. Then click Activate.
If slui 4 doesn’t open, run it from Command Prompt as administrator. Still stuck? Email us at support@krbkeys.com with a screenshot of the error.
Frequently asked questions
Does error 0xC004F012 mean my product key is fake or blocked?
No. 0xC004F012 means Windows couldn’t read its own license data. A blocked key gives a different error, 0xC004C060, and a key used on another PC gives 0xC004C008.
Will rebuilding tokens.dat delete my files?
No. It only resets the activation data. Your files, apps and settings stay as they are. You’ll need to enter your product key again afterwards.
I upgraded from Windows 10 to 11 and got 0xC004F012. What should I do?
Run the Activation troubleshooter first, signed in with the Microsoft account linked to your license. If that doesn’t work, rebuild the license store (Fix 3) and enter your key again.
The command sppsvc says “Access is denied”. What now?
Make sure Command Prompt is running as administrator. If it still fails, run sfc /scannow, restart and try again.
Can I use my Windows 10 key on Windows 11?
Yes, a genuine Windows 10 key activates the same edition of Windows 11, for example Windows 10 Pro to Windows 11 Pro.












