简体   繁体   English

.NET 4无法安装,因为SECUREREPAIR无法创建文件SetupResources.dll的CreateContentHash:用于计算哈希错误:997

[英].NET 4 fails to install because SECUREREPAIR fails to CreateContentHash of file SetupResources.dll: for computing hash Error: 997

I have trouble installing any .NET Framework on my Windows 7 x64 machine, I keep getting the following logfile, what might cause this? 我在Windows 7 x64计算机上安装任何.NET Framework时遇到问题,我不断收到以下日志文​​件,可能是什么原因引起的?

OS Version = 6.1.7601, Platform 2, Service Pack 1
OS Description = Windows 7 - x64 Ultimate Edition Service Pack 1
CommandLine = C:\09b8fe547577883fe82c\\Setup.exe /x86 /x64
TimeZone = Mitteleuropäische Zeit
Initial LCID = 1031
Using Simultaneous Download and Install mechanism
Operation: Installing
Package Name = Microsoft .NET Framework 4 Setup
Package Version = 4.0.30319
User Experience Data Collection Policy: AlwaysUploaded
Number of applicable items: 11
Exe (C:\09b8fe547577883fe82c\SetupUtility.exe) succeeded.
Exe Log File: dd_SetupUtility.txt
ServiceControl operation succeeded!
ServiceControl operation succeeded!
Exe (C:\09b8fe547577883fe82c\Windows6.1-KB958488-v6001-x64.msu) failed with 0x240006 - (null).
Exe (C:\09b8fe547577883fe82c\SetupUtility.exe) succeeded.
Exe Log File: dd_SetupUtility.txt
MSI (C:\09b8fe547577883fe82c\netfx_Core_x64.msi) Installation failed. Msi Log: Microsoft .NET Framework 4 Setup_20150116_161918591-MSI_netfx_Core_x64.msi.txt
Final Result: Installation failed with error code: (0x80070643), "Schwerwiegender Fehler bei der Installation. " (Elapsed time: 0 00:00:11).

I have pasted a LOGfile from the MSI file, can you please take a look? 我已经从MSI文件粘贴了一个LOG文件,你能看一下吗?

https://paste.ee/p/zXSWH https://paste.ee/p/zXSWH

The main problem seems to be the following information I found in the setup log ( see line 2981 to 2999 in the log above ): 主要问题似乎是我在安装日志中找到的以下信息( 参见上面日志中的第2981到2999行 ):

MSI (s) (78!78) [16:11:30:749]: SECUREREPAIR: Failed to CreateContentHash of the file: 1033\SetupResources.dll: for computing its hash. Error: 997
MSI (s) (78!78) [16:11:30:750]: SECREPAIR: Failed to create hash for the install source files
MSI (s) (78!78) [16:11:30:750]: SECUREREPAIR: SecureRepair Failed. Error code: 3e5F7CE34B8
Aktion gestartet um 16:11:30: CA_NgenUpdateHighestVersion_I_RB_amd64.3643236F_FC70_11D3_A536_0090278A1BB8.
MSI (s) (78!78) [16:11:30:753]: 

The only information I found concerning problems with Secrepair is KB2918614, which I completely uninstalled, rebooted, but the problem persists. 我发现有关Secrepair问题的唯一信息是KB2918614,我完全卸载了它,重新启动,但问题仍然存在。 Furthermore, I have reinstalled KB2918614, applied its Hotfix (KB3000988), and the problem still persits. 此外,我重新安装了KB2918614,应用了其修补程序(KB3000988),问题仍然存在。

It happens with .NET Framework 4.0 and 4.5, no matter which of these I try to install. 它发生在.NET Framework 4.0和4.5中,无论我尝试安装哪一个。

I first noticed this problem when trying to apply the update for .NET 4.5.2, which failed, so I uninstalled .NET framework 4 and 4.5 completely, and am now unable to install any of these. 我第一次注意到这个问题在尝试应用.NET 4.5.2的更新时失败了,所以我完全卸载了.NET framework 4和4.5,现在无法安装任何这些。

Do you have any ideas what might be causing this strange behaviour? 你有什么想法可能导致这种奇怪的行为吗?

The solution provided by Thaoden (uninstalling KB2918614, KB3000988 and KB3008627) didn't work for me. Thaoden提供的解决方案(卸载KB2918614,KB3000988和KB3008627)对我不起作用。 I got the same errors after uninstalling these updates. 卸载这些更新后,我遇到了同样的错误。

What did work for me was the whitelisting workaround suggested by JohnL999 here . 对我有用的是JohnL999 在此建议的白名单解决方法。

So, what I had to do to make it install: 那么,我要做的就是安装它:

  1. Create a DWORD named SecureRepairPolicy with value 2 in HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer创建名为SecureRepairPolicy且值为2的DWORD

  2. Create Key SecureRepairWhitelist in HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer创建密钥SecureRepairWhitelist

  3. In SecureRepairWhitelist , create a String with the product ID you want to whitelist as name. SecureRepairWhitelist ,使用要将其列入白名单的产品ID创建一个String。 In my case this was {3911CF56-9EF2-39BA-846A-C27BD3CD0685} . 就我而言,这是{3911CF56-9EF2-39BA-846A-C27BD3CD0685} You can find out the product ID in the msi log file, some lines before the error 您可以在msi日志文件中找到产品ID,错误之前会显示一些行

     SECUREREPAIR: Failed to CreateContentHash of the file: 1030\\SetupResources.dll: for computing its hash. Error: 997. 

    It looks like this: 它看起来像这样:

     SECREPAIR: Hash Database: C:\\windows\\Installer\\SourceHash{3911CF56-9EF2-39BA-846A-C27BD3CD0685} 

    or this: 或这个:

     SOURCEDIR product ==> {3911CF56-9EF2-39BA-846A-C27BD3CD0685} 

    Might be a different product ID depending on the MSI you want to install. 根据您要安装的MSI,可能是不同的产品ID。

After some long days of fruitlessly searching, I stumbled across https://forums.lenovo.com/t5/ThinkVantage-Technologies/Install-of-Sytem-update-fails-with-MSI-installer-Error-997/td-p/1802731 . 经过一段漫长的无聊搜索,我偶然发现了https://forums.lenovo.com/t5/ThinkVantage-Technologies/Install-of-Sytem-update-fails-with-MSI-installer-Error-997/td-p / 1802731 It says there to uninstall KB2918614, KB3000988 and KB3008627. 它说要卸载KB2918614,KB3000988和KB3008627。 That did the trick for me. 这对我有用。
Apparently, the culprit is KB3008627 as I didn't uninstall that one in my previous attempts. 显然,罪魁祸首是KB3008627,因为我在之前的尝试中没有卸载那个。

I still kept getting this error even after uninstalling KB2918614, etc., and what finally fixed it for me was to rename C:\\ProgramData\\Microsoft\\Crypto\\RSA\\S-1-5-18 to C:\\ProgramData\\Microsoft\\Crypto\\RSA\\S-1-5-18.bak for example. 卸载KB2918614等后,我仍然一直收到此错误,最后修复它的是将C:\\ProgramData\\Microsoft\\Crypto\\RSA\\S-1-5-18重命名为C:\\ProgramData\\Microsoft\\Crypto\\RSA\\S-1-5-18.bak Only then when retrying the failing installation will it succeed! 只有这样,重试失败的安装才会成功! :) :)

The failing installation will recreate that folder. 失败的安装将重新创建该文件夹。

I found this solution in the comments section of this blog post: 我在这篇博文的评论部分找到了这个解决方案:

Gerd Hübner 4 Sep 2015 6:15 AM # GerdHübner2015年9月4日上午6:15#

In short: Rename the folder C:\\ProgramData\\Microsoft\\Crypto\\RSA\\S-1-5-18 简而言之:重命名文件夹C:\\ ProgramData \\ Microsoft \\ Crypto \\ RSA \\ S-1-5-18

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM