Retrieving COM Class Factory For Component With CLSID {F497F7BF-B0C1-415B-8AFE-31484878AE5F} Failed Due to error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

How to handle the error - 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), received during retrieving the COM class factory for component with CLSID {F497F7BF-B0C1-415B-8AFE-31484878AE5F} ?

Perform the below steps:

  1. Make sure that your security team allows DLLs to be executed from the user profile (specifically %userprofile%\.nuget)
  • This needs to be checked by looking at security policies (either antivirus or group policies) this is not something that can be checked by looking at read/write/execute permissions on a file.
  1. If DLLs are not allowed to be executed from the user profile, then the Robot needs to be configured to store all its packages in a location that is allowed to execute DLLs. The typical location to do this would be in %programdata%\UiPath\Packages.
  1. This can be done at installation time by specifying a PACKAGES_FOLDER. More information can be checked in Command Line Parameters
  2. Post install, this can be done as follows:
    • Open and edit UiPath.config (by default, this file is located at C:\Program Files (x86)\UiPath\Studio) to include the following lines:

<packageSettings/>
<add key="packagesInstallationFolder" value=<desired installation folder/>
</packageSettings>

  1. Also the following path could be checked to resolve the issue: C:\ProgramData\UiPath\NugetPackages
  1. If the DLLs are allowed to execute from the user profile, then most likely the issue is with a security software. For example: McAffee has the ability to block our DLL files from hooking onto an application (which is why this issue usually happens with UiAutomation activities.
  1. Connect with the security admin and make sure that all UiPath files are properly whitelisted.
  2. Feel free to have a security admin open a ticket with UiPath if help is needed to understand what policies need to be adjusted and why.
  3. That security policies are the issues that can be validated by monitoring the process using the debugging tool procmon.
  4. That security policies are the issue can be validated by monitoring the process using the debugging tool procmon.
  5. Adjust App Locker settings to unblock UiExplorer. UiExplorer is a separate application located within the UiPath Studio install directory, listed as “UiPath.Explorer.Launcher. First, try to manually open UiExplorer from C:\Users\{username}\.nuget\packages\uipath.uiautomation.activities\version#\build\ - if you get an error/popup that application was blocked by App Locker, consult with IT to whitelist the packages folder
  1. See the following McAfree
  2. Disable “Export address filtering (EAF)” setting in Exploit Guard