How to rebuild the Tokens.dat or Activation Tokens file in Windows 10/8/7

The Tokens.dat file in the Windows operating system is a digitally signed file, which stores most of the Windows activation files. All files together have a digital signature that prevents tokens.dat be replaced on other machines, in this case, if used on different machines, will ask for online activation.

Sometimes the Tokens.dat file may get corrupted as a result of which Windows Activation may not take place successfully. In such a case, you may want to troubleshoot Windows Activation. Now when you are troubleshooting Windows Activation problems, you may have to rebuild the Tokens.dat file.

This tutorial will show you how to rebuild the Tokens.dat file in Windows.

Rebuild the Tokens.dat file in Windows 10/8

The activation tokens file for Windows 8/10 is typically located at:

C:\Windows \ServiceProfiles\LocalService\AppData\Local\Microsoft\WSLicense

Open an elevated command prompt windows from the WinX Menu, and type each of the following commands one after the other. After typing in each command, hit Enter.

net stop sppsvc
cd %windir%\ServiceProfiles\LocalService\AppData\Local\Microsoft\WSLicense
ren tokens.dat tokens.bar
net start sppsvc
cscript.exe %windir%\system32\slmgr.vbs /rilc

Restart the computer.

Rebuild the Tokens.dat file in Windows 7

The activation tokens file for Windows 7 is typically located at:

C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\ SoftwareProtectionPlatform\tokens.dat.

Open an elevated command prompt window and type each of the following commands one after the other. After typing in each command, hit Enter.

net stop sppsvc
cd %windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform
ren tokens.dat tokens.bar
net start sppsvc
cscript.exe %windir%\system32\slmgr.vbs /rilc

Restart the PC.

Do note that after you rebuild the Tokens.dat file, you will have to re-enter and reactivate your copy of Windows by entering the product key. To do this, right-click Computer > Properties > Change product key OR you could simply type the following in an elevated CMD and hit Enter, as suggested in KB2736303:

cscript.exe %windir%\system32\slmgr.vbs /ipk

Finally, to see the licensing status of your Windows installation type slmgr.vbs /dlv in the search bar and hit Enter.

There is an easy way to backup your Windows and Office Activation Tokens files with Advanced Tokens Manager if you feel the need to do so.

Download this VPN to secure all your Windows devices and browse anonymously
Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

4 Comments

  1. Austin

    What about Windows 10?

  2. Sorabh Solanki

    HELLO SIR plzz help me. whenever i try to run any slmgr command like /ipk (my product key) or /? or /xpr. below error popsup..

    WINDOWS SCRIPT HOST-

    error 0x80041002 occured in connecting to the local WMI provider.

    on a computer running microsoft non-core edition,run -slui.exe 0x2a0x80041002, to display the error text.

    and when i run slui.exe it show windows is activated but there is no info under pc info-activation..it shows PRODUCT ID NOT AVAILABLE.

    SIR plzz help me what to do. my pc is running on windows 8 pro 32bit.

  3. Randy Sulague

    Thank you

  4. Lasse Skogland

    The tokens.dat file can sometimes be found in “C:WindowsSystem32sppstore2.0”.
    At least that’s where mine was.

Leave a Reply

Your email address will not be published. Required fields are marked *


1 + 6 =