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 11/10/8/7.
Rebuild the Tokens.dat file in Windows 11/10
The activation tokens file for Windows 11/10/8 is typically located at:
Open an elevated command prompt window 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:
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.