Error "dll failed to register. HRESULT -2147024703" while installing DLP Agent
search cancel

Error "dll failed to register. HRESULT -2147024703" while installing DLP Agent

book

Article ID: 174838

calendar_today

Updated On:

Products

Data Loss Prevention Endpoint Prevent

Issue/Introduction

The DLP agent install fails and the installAgent.log shows an error registering one of the .dll files.

Product: AgentInstall-x64_(version) -- Error 1904.Module C:\Program Files\Manufacturer\Endpoint Agent\fomc64.dll failed to register.  HRESULT -2147024703.  Contact your support personnel.

Environment

DLP Endpoint Agent 16.1

Cause

One of the dependencies for the .dll file are not available therefore the .dll can not register.

Resolution

  • There are two ways to approach the solution to this issue. The first method is to just reinstall / repair the C++ redistributable. If that does not work then the second method is to use a third party utility named Dependency Walker to find the specific missing dependency then reinstall / repair the relevant application.

    Method 1: Reinstall / Repair C++ Redistributable

    Most Known agent dependencies come install with the Windows OS with the exception of the C++ redistributable. These will need to be reinstalled or repaired. The follow is instructions on how to repair them.

    1. Open Apps and Features (Add / Remove Programs)
    2. Find Microsoft Visual C++ <version> x86 (Latest version is 2022, but earlier versions of DLP agent may use 2008)
    3. Right click and select modify and then repair.
    4. Repeat the same process with Visual C++ <version> x64
    5. Reboot 
    6. Retry the DLP Agent install

    If the issue persists then try method 2.

    Method 2: Using Dependency Walker To Find Missing Dependencies

    This utility is designed to help find the dependencies for .dll files. It will also show if the dependencies are missing or not registered correctly.

    1. Download the latest compiled release of WinDepends from the project's GitHub page: https://github.com/hfiref0x/WinDepends/releases
    2. Extract the downloaded archive to a folder (no installation is required, but you might need to install .NET Desktop Runtime 10.0 too).  
    3. Run WinDepends (WinDepends.exe).  
    4. Go to File > Open (or drag and drop) and browse to the .dll that is reporting the error. If the .dll is not present on the system, copy the .dll from a known good source or run WinDepends before closing the error / warning during a manual (not silent) DLP agent install. Once the .dll is selected it can take a few moments for the system to scan for dependencies.
    5. In the tree view, review the children of the .dll from the error.
    6. Any .dll's shown with a red error icon are not installed properly and need to be either installed / repaired. (You will notice it automatically filters out standard Windows ApiSet false-positives). In the case above the problem .dll files are msvcr120.dll and msvcp120.dll. To reinstall / repair the .dll's find the parent program by doing a google search "How to install msvcr120.dll". In this case that .dll belongs to the C++ redistributable. (screenshot taken from previous Dependency walk tool)
    7. Once the source for the .dll has been reinstalled / repaired, restart the client machine.
    8. Do Steps 3 - 5 again. The dependencies should no longer have a red icon next to them.
    9. Attempt agent install again.