|
45 | 45 |
|
46 | 46 | #define EDGE_REGISTRY_KEY L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\msedge.exe" |
47 | 47 | #define IE_CLSID_REGISTRY_KEY L"SOFTWARE\\Classes\\InternetExplorer.Application\\CLSID" |
| 48 | +#define IE_REDIRECT L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Ext\\CLSID" |
48 | 49 | #define IE_SECURITY_ZONES_REGISTRY_KEY L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones" |
49 | 50 | #define IE_TABPROCGROWTH_REGISTRY_KEY L"Software\\Microsoft\\Internet Explorer\\Main" |
50 | 51 |
|
@@ -126,7 +127,7 @@ void BrowserFactory::Initialize(BrowserFactorySettings settings) { |
126 | 127 | this->clear_cache_ = settings.clear_cache_before_launch; |
127 | 128 | this->browser_command_line_switches_ = StringUtilities::ToWString(settings.browser_command_line_switches); |
128 | 129 | this->initial_browser_url_ = StringUtilities::ToWString(settings.initial_browser_url); |
129 | | - this->edge_ie_mode_ = settings.attach_to_edge_ie; |
| 130 | + this->edge_ie_mode_ = settings.attach_to_edge_ie || this->ie_redirects_edge_; |
130 | 131 | LOG(DEBUG) << "path before was " << settings.edge_executable_path << "\n"; |
131 | 132 | this->edge_executable_location_ = StringUtilities::ToWString(settings.edge_executable_path); |
132 | 133 | LOG(DEBUG) << "path after was " << this->edge_executable_location_.c_str() << "\n"; |
@@ -1243,6 +1244,17 @@ BOOL CALLBACK BrowserFactory::FindDialogWindowForProcess(HWND hwnd, LPARAM arg) |
1243 | 1244 | void BrowserFactory::GetIEExecutableLocation() { |
1244 | 1245 | LOG(TRACE) << "Entering BrowserFactory::GetIEExecutableLocation"; |
1245 | 1246 |
|
| 1247 | + std::wstring redirection; |
| 1248 | + if (RegistryUtilities::GetRegistryValue(HKEY_LOCAL_MACHINE, |
| 1249 | + IE_REDIRECT, |
| 1250 | + L"{1FD49718-1D00-4B19-AF5F-070AF6D5D54C}", |
| 1251 | + &redirection)) { |
| 1252 | + this->ie_redirects_edge_ = redirection == L"1"; |
| 1253 | + } |
| 1254 | + else { |
| 1255 | + LOG(WARN) << "Unable to determine IE to Edge Redirection"; |
| 1256 | + } |
| 1257 | + |
1246 | 1258 | std::wstring class_id; |
1247 | 1259 | if (RegistryUtilities::GetRegistryValue(HKEY_LOCAL_MACHINE, |
1248 | 1260 | IE_CLSID_REGISTRY_KEY, |
|
0 commit comments