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

10

I have trouble installing any .NET Framework on my Windows 7 x64 machine, I keep getting the following logfile, what might cause this?

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?

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):

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. Furthermore, I have reinstalled KB2918614, applied its Hotfix (KB3000988), and the problem still persits.

It happens with .NET Framework 4.0 and 4.5, no matter which of these I try to install.

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.

Do you have any ideas what might be causing this strange behaviour?

.net
installation
windows-installer
asked on Stack Overflow Jan 19, 2015 by Jackie_de • edited Jan 19, 2015 by Jackie_de

3 Answers

20

The solution provided by Thaoden (uninstalling KB2918614, KB3000988 and KB3008627) didn't work for me. I got the same errors after uninstalling these updates.

What did work for me was the whitelisting workaround suggested by JohnL999 here.

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

  2. Create Key SecureRepairWhitelist in HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer

  3. In SecureRepairWhitelist, create a String with the product ID you want to whitelist as name. In my case this was {3911CF56-9EF2-39BA-846A-C27BD3CD0685}. You can find out the product ID in the msi log file, some lines before the error

    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.

answered on Stack Overflow Jul 18, 2015 by Torben Kohlmeier • edited May 23, 2017 by Community
5

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. It says there to uninstall KB2918614, KB3000988 and KB3008627. That did the trick for me.
Apparently, the culprit is KB3008627 as I didn't uninstall that one in my previous attempts.

answered on Stack Overflow Jan 23, 2015 by Thaoden
2

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. 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 #

In short: Rename the folder C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18

answered on Stack Overflow Dec 16, 2015 by Rami A. • edited Jun 20, 2020 by Community

User contributions licensed under CC BY-SA 3.0