When installing a third-party program, you may encounter the error 2895 mentioning riched20.dll. The entire error message is below:
Error 2894.Info 2894. Loading RICHED20.DLL failed. GetLastError() returned: 5.
For example, the above error may occur when installing these apps:
- H&R Block Tax
- TurboTax
- NVivo
- Retrospect 19
Cause
Error code 5 denotes “ERROR_ACCESS_DENIED.” The above issues occur if the module riched20.dll has lost the NTFS permission entries or ACEs and ownership, making the file inaccessible to users. Based on our observation, this happens for the 32-bit version of riched20.dll located at C:\Windows\SysWOW64\Riched20.dll
.
Resolution
To resolve the issue, take ownership of riched20.dll
and assign the necessary permissions.
Open an admin Command Prompt window.
Execute the following commands one by one:
cd /d c:\windows\syswow64\
TAKEOWN /F riched20.dll /a
ICACLS riched20.dll /reset
ICACLS riched20.dll /inheritance:r
ICACLS riched20.dll /grant "NT SERVICE\TrustedInstaller":(F)
ICACLS riched20.dll /grant "Administrators":(RX)
ICACLS riched20.dll /grant "NT AUTHORITY\SYSTEM":(RX)
ICACLS riched20.dll /grant "BUILTIN\Users":(RX)
ICACLS riched20.dll /grant "ALL APPLICATION PACKAGES":(RX)
ICACLS riched20.dll /grant "ALL RESTRICTED APPLICATION PACKAGES":(RX)
ICACLS riched20.dll /setowner "NT Service\TrustedInstaller"
ICACLS riched20.dll /grant "Administrators":(F)
The Advanced Security Settings dialog for Riched20.dll should now look like the following:
(For more information about takeown.exe and icacls.exe, check out the article Take Ownership of a File or Folder Using Command-Line in Windows.)
The above commands give full control privileges to the file for the “administrators” group and the “SYSTEM” account.
That’s it! You should no longer get the “riched20.dll GetLastError” when installing third-party apps.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
I have windows 10 and when installing TurboTax 2022 I get error code 2894.
I am not sure how to use the code you provided.
cd /d c:\windows\syswow64\
TAKEOWN /F riched20.dll /a
ICACLS riched20.dll /reset
ICACLS riched20.dll /inheritance:r
ICACLS riched20.dll /grant “NT SERVICE\TrustedInstaller”:(F)
ICACLS riched20.dll /grant “Administrators”:(RX)
ICACLS riched20.dll /grant “NT AUTHORITY\SYSTEM”:(RX)
ICACLS riched20.dll /grant “BUILTIN\Users”:(RX)
ICACLS riched20.dll /grant “ALL APPLICATION PACKAGES”:(RX)
ICACLS riched20.dll /grant “ALL RESTRICTED APPLICATION PACKAGES”:(RX)
ICACLS riched20.dll /setowner “NT Service\TrustedInstaller”
What is (F) above regarding? Is it the Drive?
Please e-mail me a link that will do this automatically if possible.
Edition Windows 10 Home
Version 22H2
Installed on 12/7/2020
OS build 19045.2728
Experience Windows Feature Experience Pack 120.2212.4190.0
John,
Copy each command and paste it into the admin Command Prompt window. Press Enter for each command.
I’ve tried the above solution, however the last line of code : ICACLS riched20.dll /setowner “NT Service\TrustedInstaller” fails.
Help this is making me crazy 🙂