UiPath Studio

The UiPath Studio Guide

Enhanced Protected Mode in Internet Explorer

Observed Behavior

Executing a process which includes an Open Browser activity that launches Internet Explorer and navigates to a trusted site throws an exception.

System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {...} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

The issue occurs on Studio versions 2018.3 and above if the Enable Enhanced Protected Mode or the Enable 64-bit processes for Enhanced Protected Mode options are enabled.

Cause

Since version 2018.3, the Packages folder has been moved from Program Files to %userProfile%\.nuget\packages, and can even be configured to a custom location, as explained on this page. The UIAutomation package does not have sufficient privileges to interact with Internet Explorer. It only had sufficient privileges when it was in the Program Files folder, because that is where the Enhanced Protected Mode option is also enabled.

Solution

To be able to interact with Internet Explorer when the Enhanced Protected Mode is enabled, the privileges listed below need to be granted to the Packages folder:

  • Read & Execute
  • List Folder Contents
  • Read

This is done as follows:

  1. Open File Explorer and navigate to the %UserProfile%\.nuget\packages folder.
  2. Right-click the UiPath folder and select Properties. The Properties window is displayed.
  3. In the Security tab, click the Edit button from the Group or user names section. The Permissions window is displayed.
  4. Click the Add button. The Select Users or Groups window is displayed.
  5. Click the Locations button, select your machine from the list, and then click OK. You are returned to the Select Users or Groups window.
  6. Click the Advanced button to enable searching.
  7. Click the Find Now button, select ALL APPLICATION PACKAGES from the Search results list, then click OK.
  8. Click the Check Names button to validate your selection, then OK to confirm the changes and return to the Permissions window.
  9. Select the ALL APPLICATION PACKAGES object, then select the Read & Execute, List Folder Contents, and Read permissions.
  10. Click Apply to confirm the changes, then OK to close the Permissions window.

You can now use Internet Explorer in your automation projects even when the Enhanced Protected Mode option is enabled.

Updated about a year ago


Enhanced Protected Mode in Internet Explorer


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.