.NET 4 fails to install because SECUREREPAIR fails to CreateContentHash of file SetupResources.dll: for computing hash Error: 997
Solution 1:
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:
Create a DWORD named
SecureRepairPolicy
with value2
inHKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer
Create Key
SecureRepairWhitelist
inHKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer
-
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 errorSECUREREPAIR: 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.
Solution 2:
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.