var oIE = new ActiveXObject("InternetExplorer.Application");
var URLname1 = "http://www.google.com";
var URLname2 = "http://www.bing.com";
var navOpenInBackgroundTab = 0x1000;
oIE.Visible = true;
oIE.Navigate2(URLname1);
oIE.Navigate2(URLname2, navOpenInBackgroundTab);
Above is a bit of code in my javascript file (launch.js) that launches Internet Explorer with a specific webpage and then opens a new tab in the same browser window using a 2nd URL.
How do you launch the Microsoft Edge browser instead of IE in Windows 10 using ActiveXObject() or another similar method?
I cannot find the InternetExplorer.Application equivalent for Microsoft Edge.
Windows 10 provides URI schema for lauching Microsoft Egde from any browser. We dont use AcitveXObject at all.
Just include microsoft-edge protocol handler before your URL.
How I resolved it
function openLinkInIE(url){
window.open("microsoft-edge:"+ url);
}
Create an instance of the WSH Shell object instead:
var oShell = new ActiveXObject("WScript.Shell");
oShell.Run("cmd.exe /C start microsoft-edge:http://www.microsoft.com");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With