Windows 激活期间出现错误0xC004E002
本文提供了尝试激活 Windows 时0xC004E002错误的解决方案。
适用于:Windows Server 2012 R2、Windows 10 - 所有版本、Windows 7 Service Pack 1
原始 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 文件设置正确的权限
选择“ 开始”,然后在 “搜索 ”框中键入 cmd。
右键单击 cmd,然后选择“ 以管理员身份运行”。
在命令提示符下,根据操作系统键入以下命令,然后按 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)
关闭命令提示符窗口。
注意
必须在提升的命令提示符下键入此命令。
方法 2:重命名Tokens.dat文件
选择“ 开始”,然后在 “搜索 ”框中键入 cmd。
右键单击 cmd,然后选择“ 以管理员身份运行”。
在命令提示符下,键入以下命令,然后按 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。
键入以下命令,然后按 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
键入以下命令,然后按 Enter:
ren tokens.dat tokens.bar
键入以下命令,然后按 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
键入以下命令,然后按 Enter:
cd %windir% \System32
键入以下命令,然后按 Enter:
cscript slmgr.vbs -rilc
重新启动计算机两次,以便应用更改。
此问题是否已修复
检查问题是否已修复。 如果问题已修复,则已完成此部分。 如果问题未解决,对于 Windows 7 或 Windows Server 2008,你可以 联系支持人员。 Windows Vista 不再提供辅助支持。
数据收集
如果需要 Microsoft 支持方面的帮助,建议按照使用 TSS 针对与部署相关的问题收集信息中所述的步骤收集信息。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈