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