0

My company is using Windows Edge as our default browser (so our intranet home page is loaded in Edge). Some external links in our intranet can be open/print from Chrome without any problem, however, the issue begins if the URL is open from Edge.

Can we use JavaScript to force certain links to be open on Chrome from Edge?

I tried

var shell = new ActiveXObject("WScript.Shell");
shell.run("Chrome http://...");

I got ActiveXObject is not defined.

TylerH
  • 20,799
  • 66
  • 75
  • 101
George Huang
  • 2,504
  • 5
  • 25
  • 47
  • 1
    afaik, no you can not due to security sandbox violations. This might be possible on mobile, specifically android, but results may vary. – Steven Stark Apr 16 '19 at 20:58
  • 1
    I agree, it is not possible. Think it this way, if javascript could open a browser, it will also have permissions to open any other files on your system, which is obviously a big security risk. – Rash Apr 16 '19 at 20:59
  • How much control do you have over the other computers the employees are using? If you could change some Windows Registry settings, it might be possible – Vlad274 Apr 16 '19 at 21:07
  • You said, the issue begins if the URL is open from Edge. So you need to find that what is the cause for that issue. You can inform us the detailed information about the issue. If you are getting any error or warning message than you can inform us about that. We will try to provide possible suggestions to solve that issue. – Deepak-MSFT Apr 17 '19 at 01:15

2 Answers2

1

You can't use Javascript to do that. For security reasons, Javascript is sandboxed in your browser.

See this question for more info.

There are plugins that can do that, but this would require installing them on everyone's computer.

bluemoon6790
  • 467
  • 2
  • 11
1

ActiveX is not supported in Edge. So no, that won't work. And, since JavaScript alone is not allowed to access OS resources, you won't be able to accomplish this.

Scott Marcus
  • 64,069
  • 6
  • 49
  • 71