Automation Anywhere -RPA Legacy apps bot stopped working with Edge Chromium

Problem:

Most of the bots are failing in object cloning while logging into SAP (Legacy apps) i.e., when bot is trying to open IE simultaneously it is opening edge as well with a blank screen and getting aborted due to compatibility issue. For this issue, our RPA tried to make below setting changes in Microsoft Edge and now we are not able to find those settings in edge (post upgrade to latest stable edge). .

Workaround used by the legacy app and Automation Anywhere bot:

Cause:

The issue happens when the BOT runs, and the IE tries to launch and gets redirected to Edge.

  • Previously this was stopped by enabling the setting as below:

Edge – Settings – Default Browser – let Internet Explorer open Sites in Microsoft Edge = Never

After the Edge update the option is now disabled. This is recommended as the approach from Microsoft is to make all the sites open in Microsoft Edge.

As BOTs are triggered from SAP and the IE should be launched from within the application, we understand the dependency for IE11. However, we also would like to remind the update from Microsoft Internet Explorer 11 desktop app retirement FAQ – Microsoft Community Hub

The retired, out-of-support Internet Explorer 11 desktop application has been permanently disabled through a Microsoft Edge update on certain versions of Windows 10.  IE11 visual references, such as the IE11 icons on the Start Menu and taskbar, will be removed by the June 2023 Windows security update (“B” release) scheduled for June 13, 2023.

We got into the call and followed the article Redirection from Internet Explorer to Microsoft Edge for compatibility with modern web sites | Microsoft Learn.

This is important to keep it enabled and give option (as earlier setting “let Internet Explorer open Sites in Microsoft Edge” ). Many modern websites have designs that are incompatible with Internet Explorer. Whenever an Internet Explorer user visits an incompatible site, they get a message that tells them the site is incompatible with their browser, and they need to manually switch to a different browser.

Disabling the redirection is not a recommended approach as it may impact other applications. However, we wanted to try if this helps the current issue.

Followed https://learn.microsoft.com/en-us/deployedge/edge-learnmore-neededge#disable-redirection-to-microsoft-edge

RedirectSitesFromInternetExplorerRedirectMode  = Disabled.

RedirectSitesFromInternetExplorerPreventBHOInstall  = Enabled (If you enable this policy, the BHO will not be installed. If it is already installed it will be uninstalled on the next Microsoft Edge update.)

We see even after the setting is applied via registry the issue is still not fixed. From our analysis we suspect the BHO must be disabled and even though we have enabled it the effect will happen in the next Microsoft Edge update.

Further, we cannot disable the BHO manually as the option from Internet options – Manage addons – IEToEdge BHO – enable /disable are greyed out.

Workaround

1.HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Edge\IEToEdge
    

  1. Value name : RedirectionMode
  2. Value type : REG_DWORD
  3. Data       : 0 (Never)


2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Ext\CLSID

  1. {1FD49718-1D00-4B19-AF5F-070AF6D5D54C} and set its data to 0

Reference:How to Stop Internet Explorer from Redirecting to Microsoft Edge » Winhelponline

Edge chromium – Clearbrowsercache

<#
.SYNOPSIS
   This is a script for the cleanup of Edge browser cache on windows devices

.DESCRIPTION
 Clearbrowsercache

.PARAMETER  
	Default Parametername

.EXAMPLE
	powershell -executionpolicy bypass -file Clearbrowsercache.ps1

.NOTES
	NAME:		<Clearbrowsercache>
	AUTHOR:		
	KEYWORDS:	Keyword1


.CHANGE
	Author : Kamal  30/06/2023
	Version 1.0
#>
	
Function main {

## Allows the use of -WhatIf
    [CmdletBinding(SupportsShouldProcess=$True)]

param(
    ## LogFile path for the transcript to be written to
        [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,Position=0)]
        $LogFile = ("C:\CMDMGMT\LOGS\"+"ClearEdgecache"+'.log'),

    ## All verbose outputs will get logged in the transcript($logFile)
        [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,Position=2)]
        $VerbosePreference = "Continue",

    ## All errors should be withheld from the console
        [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,Position=3)]
        $ErrorActionPreference = "SilentlyContinue"
)

    ## Begin the timer
        $Starters = (Get-Date) 
	
	 ## Check $VerbosePreference variable, and turns -Verbose on
        Function global:Write-Verbose ( [string]$Message ) {
            if ( $VerbosePreference -ne 'SilentlyContinue' ) {
                Write-Host "$Message" -ForegroundColor 'Green'
            }
        }

        Start-Transcript -Path $LogFile
        Write-Verbose "Start time: $starters"
        
    ## Check $VerbosePreference variable, and turns -Verbose on
        Function global:Write-Verbose ( [string]$Message ) {
            if ( $VerbosePreference -ne 'SilentlyContinue' ) {
                Write-Host "$Message" -ForegroundColor 'Green'
            }
        }	
        
Function ClearEdgecache {

# Stop all instances of the Microsoft Edge browser
Get-Process -Name msedge | Stop-Process -Force

$Items = @('Archived History',
            'Cache\*',
            'Cookies',
            'History',
            'Login Data',
            'Top Sites',
            'Visited Links',
            'Web Data')
$Folder = "C:\Users\*\AppData\Local\Microsoft\Edge\User Data\Default"
$Items | % { 
    if (Test-Path "$Folder\$_") {
        Remove-Item "$Folder\$_" -Recurse -Force -EA SilentlyContinue -Verbose
    }
}
}
ClearEdgecache

 ## Completed Successfully!
 Write-Host (Stop-Transcript) -ForegroundColor Green
 
}
  Main