许可与激活

激活期间0xC004E002错误 - Windows Server

· 52CE 我爱测

本文提供了尝试激活 Windows 时0xC004E002错误的解决方案。 原始 KB 数: 978305 现象 尝试激活 Windows Vista、Windows Server 2008、Windows 7、Windows Server 2008 R2、Windows 8、Windows Server 2012、Windows 8.1 或 Windows Server 2012 R2 时,可能会收到以下错误消息之一: 代码:0xC004C003 说明:

本文提供了尝试激活 Windows 时0xC004E002错误的解决方案。

原始 KB 数: 978305

现象

尝试激活 Windows Vista、Windows Server 2008、Windows 7、Windows Server 2008 R2、Windows 8、Windows Server 2012、Windows 8.1 或 Windows Server 2012 R2 时,可能会收到以下错误消息之一:

代码:0xC004C003 说明:激活服务器确定指定的产品密钥已被阻止。

代码:0xC004E002 说明:软件许可服务报告许可证存储包含不一致的数据。

原因

出现此问题的原因是对Tokens.dat文件设置了不正确的权限,或者此文件已损坏。

解决方法

若要解决此问题,请按顺序尝试以下方法。

方法 1:将正确的权限设置为Tokens.dat文件

  1. 选择“开始”,然后在“搜索**”框中键入 cmd**。

  2. 右键单击 cmd,然后选择“ 以管理员身份运行”。

  3. 在命令提示符下,根据操作系统键入以下命令,然后按 Enter:

    对于 Windows Vista 或 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)"
    

    tokens.dat的正确权限应类似于 icacls 的以下输出:

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

    对于 Windows 7 或 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)"
    

    token.dat的正确权限应类似于 icacls 的以下输出:

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

    对于 Windows 8、Windows Server 2012、Windows 8.1 或 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)"
    

    tokens.dat的正确权限应类似于 icacls 的以下输出:

    tokens.dat NT AUTHORITY\SYSTEM:(I)(F)
             BUILTIN\Administrators:(I)(F)
             NT SERVICE\WSService:(OI)(CI)(R,W,D)
    
  4. “关闭命令提示符”窗口。

注意

必须从提升的命令提示符键入此命令。

方法 2:重命名Tokens.dat文件

  1. 选择“开始”,然后在“搜索**”框中键入 cmd**。

  2. 右键单击 cmd,然后选择“ 以管理员身份运行”。

  3. 在命令提示符下,键入以下命令,然后按 Enter。

    对于 Windows Vista 或 Windows Server 2008

    net stop slsvc
    

    对于 Windows 7 或 Windows Server 2008 R2

    net stop sppsvc
    

    对于 Windows 8、Windows Server 2012、Windows 8.1 或 Windows Server 2008 R2

    net stop sppsvc
    

    注意

    如果收到一条消息,询问是否要继续执行此操作,请键入 Y,然后按 Enter。

  4. 键入以下命令,然后按 Enter。

    对于 Windows Vista 或 Windows Server 2008

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

    对于 Windows 7 或 Windows Server 2008 R2

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

    对于 Windows 8、Windows Server 2012、Windows 8.1 或 Windows Server 2008 R2:

    cd %windir%\ServiceProfiles\LocalService\AppData\Local\Microsoft\WSLicense
    
  5. 键入以下命令,然后按 Enter:

    ren tokens.dat tokens.bar
    
  6. 键入以下命令,然后按 Enter:

    对于 Windows Vista 或 Windows Server 2008

    net start slsvc
    

    对于 Windows 7 或 Windows Server 2008 R2

    net start sppsvc
    

    对于 Windows 8、Windows Server 2012、Windows 8.1 或 Windows Server 2008 R2:

    net start sppsvc
    
  7. 键入以下命令,然后按 Enter:

    cd %windir% \System32
    
  8. 键入以下命令,然后按 Enter:

    cscript slmgr.vbs -rilc
    
  9. 重启计算机两次,以便应用更改。

此问题是否修复了问题

检查问题是否已修复。 如果问题已修复,则已完成本部分。 如果问题未解决,对于 Windows 7 或 Windows Server 2008,可以 联系支持人员。 Windows Vista 不再提供辅助支持。

数据收集

如果需要 Microsoft 支持方面的帮助,建议按照使用 TSS 针对与部署相关的问题收集信息中所述的步骤收集信息。

资料来源与适用范围

资料来源
微软官方中文故障文档
适用范围
按正文的 Windows / Windows Server 适用版本;保留原文兼容性要求
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-10-26
授权说明
CC BY 4.0

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

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