大网数据广告活动
启动与系统组件

Error 0xC004E002 during activation

· 52CE 我爱测

Provides a solution to an error 0xC004E002 when you try to activate Windows.

This article provides a solution to an error 0xC004E002 when you try to activate Windows.

Original KB number:   978305

Symptoms

When you try to activate Windows Vista, Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows 8, Windows Server 2012, Windows 8.1, or Windows Server 2012 R2, you may receive one of the following error messages:

Code: 0xC004C003
Description: The activation server determined that the specified product key has been blocked.

Code: 0xC004E002
Description: The Software Licensing Service reported that the license store contains inconsistent data.

Cause

This issue occurs because the incorrect permissions are set on the Tokens.dat file or this file is corrupted.

Resolution

To resolve this issue, try the following methods in order.

Method 1: Set the correct permissions to the Tokens.dat file

  1. Select Start, and then type cmd in the Search box.

  2. Right-click cmd, and then select Run as Administrator.

  3. At the command prompt, type the following command depending on the operating system and then press ENTER:

    For Windows Vista or Windows Server 2008:

    icacls %windir%\serviceprofiles\networkservice\appdata\roaming\microsoft\softwarelicensing /grant "BUILTIN\Administrators:(OI)(CI)(F)" "NT AUTHORITY\SYSTEM:(OI)(CI)(F)" "NT Service\slsvc:(OI)(CI)(R,W,D)"
    

    The correct permissions for tokens.dat should look like this output from icacls:

    tokens.dat NT AUTHORITY\SYSTEM:(I)(F)
             BUILTIN\Administrators:(I)(F)
             NT SERVICE\SLSVC:(I)(R,W,D)
    

    For Windows 7 or Windows Server 2008 R2:

     icacls %windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform /grant "BUILTIN\Administrators:(OI)(CI)(F)" "NT AUTHORITY\SYSTEM:(OI)(CI)(F)" "NETWORK SERVICE:(OI)(CI)(F)"
    

    The correct permissions for token.dat should look like this output from icacls:

    tokens.dat NT AUTHORITY\SYSTEM:(I)(F)
                BUILTIN\Administrators:(I)(F)
                NT AUTHORITY\NETWORK SERVICE:(I)(F)
    

    For Windows 8, Windows Server 2012, Windows 8.1, or Windows Server 2008 R2:

    icacls "%windir%\ServiceProfiles\LocalService\AppData\Local\Microsoft\WSLicense" /grant "BUILTIN\Administrators:(OI)(CI)(F)" "NT AUTHORITY\SYSTEM:(OI)(CI)(F)" "NETWORK SERVICE:(OI)(CI)(F)"
    

    The correct permissions for tokens.dat should look like this output from icacls:

    tokens.dat NT AUTHORITY\SYSTEM:(I)(F)
             BUILTIN\Administrators:(I)(F)
             NT SERVICE\WSService:(OI)(CI)(R,W,D)
    
  4. Close the Command Prompt window.

Note: You must type this command from an elevated command prompt.

Method 2: Rename the Tokens.dat file

  1. Select Start, and then type cmd in the Search box.

  2. Right-click cmd, and then select Run as Administrator.

  3. At the command prompt, type the following command and then press ENTER.

    For Windows Vista or for Windows Server 2008

    net stop slsvc
    

    For Windows 7 or for Windows Server 2008 R2

    net stop sppsvc
    

    For Windows 8, Windows Server 2012, Windows 8.1, or Windows Server 2008 R2

    net stop sppsvc
    

    [!NOTE] If you receive a message that asks whether you want to continue with this operation, type Y and then press ENTER.

  4. Type the following command and then press ENTER.

    For Windows Vista or for Windows Server 2008

    cd %windir%\serviceprofiles\networkservice\appdata\roaming\microsoft\softwarelicensing
    

    For Windows 7 or for Windows Server 2008 R2

    cd %windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform
    

    For Windows 8, Windows Server 2012, Windows 8.1, or Windows Server 2008 R2:

    cd %windir%\ServiceProfiles\LocalService\AppData\Local\Microsoft\WSLicense
    
  5. Type the following command and then press ENTER:

    ren tokens.dat tokens.bar
    
  6. Type the following command and then press ENTER:

    For Windows Vista or Windows Server 2008

    net start slsvc
    

    For Windows 7 or Windows Server 2008 R2

    net start sppsvc
    

    For Windows 8, Windows Server 2012, Windows 8.1, or Windows Server 2008 R2:

    net start sppsvc
    
  7. Type the following command and then press ENTER:

    cd %windir% \System32
    
  8. Type the following command and then press ENTER:

    cscript slmgr.vbs -rilc
    
  9. Restart the computer two times for the changes to apply.

Did this fix the problem

Check whether the problem is fixed. If the problem is fixed, you're finished with this section. If the problem isn't fixed, for Windows 7 or Windows Server 2008, you can contact support. Assisted support is no longer available for Windows Vista.

Data collection

If you need assistance from Microsoft support, we recommend you collect the information by following the steps mentioned in Gather information by using TSS for deployment-related issues.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。