Fix it now
Microsoft publishes no description for any of these six codes, so do not let anyone tell you which part of the store each one names. What is documented is the repair: rebuild the token store. Record how this machine is licensed first, because the rebuild discards the licences currently loaded.
slmgr /dli
net stop sppsvc
cd %windir%\ServiceProfiles\LocalService\AppData\Local\Microsoft\WSLicense
ren tokens.dat tokens.bar
net start sppsvc
cd %windir%\System32
cscript slmgr.vbs -rilc
- Do not skip the first line.
slmgr /dlitells you the channel and the last five characters of the key, and that is what you are recovering to. - If the licence is a digital one, link it to a Microsoft account in Settings, System, Activation before you rename anything.
- That folder path is the documented one for Windows 8 and Windows Server 2012 onwards. If it is not there, older generations use different folders, listed further down.
- Restart twice after the last command. Microsoft’s procedure specifies two restarts.
- Reinstall the key with
slmgr /ipk <key>and activate withslmgr /atoif the machine comes back unlicensed.
Rename, do not delete. The renamed file is the only route back if the rebuild leaves you worse off.
If activation holds across both restarts you are finished. If the store breaks again, the next section explains what keeps doing it.
Why it happens
Start with what is not known. None of 0x8004E101, 0x8004E103, 0x8004E106, 0x8004E108, 0x8004E109 or 0x8004E10A has a published description on learn.microsoft.com or support.microsoft.com. Articles that tell you one names a version mismatch and another names a duplicate entry are describing a mapping the vendor has never published. Read the text your own machine holds instead: slui.exe 0x2a 0x8004E101 is documented and prints it.
What is documented is the thing they interfere with. Licences arrive as individual signed files, but evaluating each one on every request would be slow, so the Software Protection service loads them into a token store held on disk under the Windows directory and owned by a low-privilege service account. That file is what the service reads at start, and it is rewritten whenever a licence is installed, removed or renewed.
Because it is written often and read at service start, it is unusually exposed to interruption. Microsoft’s own published repair for a token-store fault, written up against 0xC004E002, is the sequence in the fix above: stop the service, rename tokens.dat, start the service, reinstall the licence files with slmgr /rilc, restart twice. That is the procedure to reach for whatever the exact code on screen turns out to be.
The path has moved between Windows generations, which is where a lot of bad advice comes from. On Windows 8, Windows Server 2012 and everything since, it is %windir%\ServiceProfiles\LocalService\AppData\Local\Microsoft\WSLicense. Two earlier generations used different folders and, on the oldest, a different service name. Use the documented path for the machine in front of you rather than a remembered one.
The store is left over from a previous build
You have this one if The failure began immediately after a feature update or an in-place upgrade, and nothing else on the machine changed.
- Run
slmgr /rilcand restart. It reinstalls the licence files that installation stored as known-good copies. - If that changes nothing, run the full rebuild: stop sppsvc, rename tokens.dat, start sppsvc,
slmgr /rilc, restart twice. - Reinstall the key if needed, then
slmgr /ato, and read the result withslmgr /dlv.
Something is holding the file open
You have this one if The rename is refused with a sharing violation even though the service is stopped.
- Confirm the service really stopped:
sc query sppsvcshould say STOPPED, not STOP_PENDING. - Pause any backup agent, endpoint protection product or indexer that scans the Windows directory, then retry.
- If it is still refused, do the rename from Safe Mode, where far fewer agents load, then restart normally and finish the rebuild.
The permissions on the store folder are wrong
You have this one if The service starts but the store never loads, and you also see 0xC004E002.
- Run the documented icacls grant for the folder, which is the first method Microsoft gives for a store that holds inconsistent data.
- Restart, then check with
slmgr /dlvbefore renaming anything. - If a hardening baseline tightened the permissions, exempt the path there as well, or they will be tightened again.
A permission repair changes nothing about your licences, so it is always worth trying before a rebuild that discards them.
The disk underneath is failing
You have this one if The store is damaged again shortly after a successful rebuild, or repeatedly over weeks.
- Scan the volume:
chkdsk C: /scan, and schedule a repair pass if it reports problems. - Read the drive’s health with the manufacturer’s tooling.
- Replace the drive before rebuilding again. A store that keeps corrupting is a symptom, not the disease.
The store was captured into a deployment image
You have this one if Every machine from one image reports the same code, and a machine built by hand does not.
- Rebuild the reference image and generalise it with
sysprep /generalize, which Microsoft documents as calling the same rearm that resets activation timers. - Rebuild the store on machines already deployed, then re-activate.
- Prove it on one machine before pushing anything to the rest.
Full reference
The rebuild, by Windows generation
| Generation | Service | Folder |
|---|---|---|
| Windows 8 / Server 2012 and later | sppsvc |
%windir%\ServiceProfiles\LocalService\AppData\Local\Microsoft\WSLicense |
| Windows 7 / Server 2008 R2 | sppsvc |
%windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform |
| Windows Vista / Server 2008 | slsvc |
%windir%\serviceprofiles\networkservice\appdata\roaming\microsoft\softwarelicensing |
If the documented folder for your generation does not exist, then search rather than guess: Get-ChildItem -Path $env:windir -Filter tokens.dat -Recurse -ErrorAction SilentlyContinue in elevated PowerShell finds it wherever the build keeps it. Search as the fallback, not as the opening move, because a search that returns two files leaves you deciding which to rename with no information.
What the rebuild does and does not touch
| Step | Effect |
|---|---|
net stop sppsvc |
Releases the file. Nothing on the machine can activate while it is stopped |
ren tokens.dat tokens.bar |
Removes the store from play without destroying it |
net start sppsvc |
The service creates a fresh store |
cscript slmgr.vbs -rilc |
Reinstalls licences from %SystemRoot%\system32\oem and %SystemRoot%\System32\spp\tokens, the known-good copies kept at installation |
| Two restarts | Required by Microsoft’s published procedure. Do both before judging the result |
The rebuild discards the licences currently loaded. If activation rests on a digital licence that was never linked to a Microsoft account and nobody wrote the key down, you may not be able to reactivate afterwards without buying one. Link the licence or record the key first.
Reading a code your machine returned
Two documented commands print the vendor’s own text for a code, and both are worth more than any published gloss for these six. On Windows, slui.exe 0x2a 0x8004E101. In Office, cscript ospp.vbs /ddescr:0x8004E101 from the Office folder. Use whichever product produced the code. If the text you get back does not match what an article told you the code means, believe your machine.
What to check when the rebuild holds but activation does not
- Confirm the service starts on demand:
sc qc sppsvcshould not report DISABLED. - Confirm a key is installed at all:
slmgr /dliafter the rebuild, since/rilcrestores licence files and not your key. - For a volume machine, confirm it can still reach its KMS host or its directory activation object before assuming the store is at fault.
- For a digital licence, sign in with the Microsoft account it was linked to and use the activation troubleshooter in Settings, System, Activation.
- Check the Application log for Security-SPP entries written at service start, which is when a store that is still failing shows itself.
Deciding whether to rebuild at all
A rebuild is cheap on a machine whose licence you can reinstate in a minute and expensive on one you cannot. The order to work in is therefore: establish the licensing route, repair permissions, repair the component store with DISM and sfc, and only then rename the file. On a fleet, prove the whole sequence on one machine before scripting it, because a script that renames tokens.dat across a hundred devices with no key inventory behind it turns a licensing annoyance into a procurement exercise.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0x8004E101 |
Returned by the licensing service when the token store cannot be used. No published description | not published by the vendor |
0x8004E103 |
Same family, no published description | not published by the vendor |
0x8004E106 |
Same family, no published description | not published by the vendor |
0x8004E108 |
Same family, no published description | not published by the vendor |
0x8004E109 |
Same family, no published description | not published by the vendor |
0x8004E10A |
Same family, no published description | not published by the vendor |
Confirm the fix worked
slmgr /dlvreturns a complete status with no store error.- The licence status reads Licensed and the channel matches what you recorded beforehand.
- Both restarts have been done and the state held across them.
- A third reboot a day later still shows the machine licensed, which is what tells you the store is stable rather than freshly written.
- Only then delete the renamed tokens.bar file.
Questions people ask about this
What does 0x8004E101 actually mean?
Microsoft does not publish a description for it, or for any of the other five codes in this article. Run slui.exe 0x2a 0x8004E101 on the affected machine to read the text Windows holds. Any article that gives you a confident one-line meaning for these codes is not quoting the vendor.
Is renaming the token store safe?
It is the documented repair, and renaming rather than deleting keeps a way back. The risk is not the file but the licences it held, which is why the first step is establishing how the machine is licensed.
Do I need to reinstall Windows?
Rarely. Work through permissions, then the rebuild, then DISM and sfc. An in-place upgrade comes after that, and a clean installation after that again.
Why does the store keep getting corrupted?
Repeated corruption points at the storage or at something interfering with the file, not at the licensing platform. Check the disk with chkdsk C: /scan and look at any agent that opens files under the Windows directory.
Will I have to buy a key?
Not if you know how the machine was licensed before you start. A retail key can be reinstalled, an OEM key sits in firmware, a volume machine re-activates against its own infrastructure, and a linked digital licence can be reclaimed. The one case that costs money is an unlinked digital licence on a machine whose key was never recorded.
