Error 2894 RICHED20.DLL GetLastError() returned: 5

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.

riched20.dll getlasterror 5 2894

For example, the above error may occur when installing these apps:

  • H&R Block Tax
  • TurboTax
  • NVivo
  • Retrospect 19


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.


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 /setowner "NT Service\TrustedInstaller"
Note: If you want to rename or replace this module with a fresh copy from the source, you need full control access. In that case, replace command #6 above with the following:

ICACLS riched20.dll /grant "Administrators":(F)

The Advanced Security Settings dialog for Riched20.dll should now look like the following:

Riched20.dll default permissions

(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!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded in 2005.

3 thoughts on “Error 2894 RICHED20.DLL GetLastError() returned: 5”

  1. 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 /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

  2. 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 🙂


Leave a Comment