Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch Chrome browser from Internet Explorer

We have a web application which has some features that works only in Chrome and I want to launch this web app using Google chrome browser with url of the web app as parameter from Internet explorer via a hyperlink. I tried

file:///C:/Program%20Files%20(x86)/Google/Chrome/application/chrome.exe

but it downloads the file + how do I add parameter to the exe.

like image 796
Kannan Karmegam Avatar asked Jun 03 '15 04:06

Kannan Karmegam


3 Answers

By default, a browser cannot launch another program (plugins and extensions being possible exceptions). If they could, imagine the havoc some malicious user could get up to.

I don't think there's going to be a great answer for this, but you could make a .bat file that opens chrome to a particular URL (assuming you're using Windows), download that and click on it after it downloads.

Here is a useful answer in that case.

You could also (theoretically) make an extension or lower the security settings on IE to allow ActiveX controls. Here's a partial solution. I tried to make something similar a while back and didn't have much luck, but if you're determined...

Maybe there's a better way that doesn't involve such complicated solutions?

like image 52
crowhill Avatar answered Sep 30 '22 10:09

crowhill


I found myself needing to achieve this myself. It appears a later release of Chrome had broken the fix described in Adam Fowlers blog.

I got in touch with him and he's now updated his post, providing the now necessary registry changes required to make this work.

I've tried this myself and it works nicely.

Adam Fowlers blog post - How to launch a URL in Google Chrome https://www.adamfowlerit.com/2015/05/how-to-launch-a-url-in-google-chrome/

Big thanks to Adam for his time! Hope this helps.

like image 39
Chris Done Avatar answered Sep 30 '22 09:09

Chris Done


This is a .reg file that creates (on a 64-bit Windows) a special URL protocol that allows you to open chrome: links in Chrome:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\chrome]
@="Chrome URL Prorocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\chrome\Application]
"ApplicationIcon"="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe,0"
"ApplicationName"="Google Chrome"
"ApplicationDescription"="Access the Internet"
"ApplicationCompany"="Google LLC"

[HKEY_CLASSES_ROOT\chrome\DefaultIcon]
@="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe,0"

[HKEY_CLASSES_ROOT\chrome\shell]

[HKEY_CLASSES_ROOT\chrome\shell\open]

[HKEY_CLASSES_ROOT\chrome\shell\open\command]
@="cmd /v:on /c \"set url=%1 & set url=!url:chrome:=! & \"\"\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"\"\" -- !url!\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ProtocolExecute\chrome]
"WarnOnOpen"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\ProtocolExecute\chrome]
"WarnOnOpen"=dword:00000000

Links should be like chrome:https://google.com or chrome:google.com. "chrome:" part is removed before launching Chrome.

like image 45
mipaaa Avatar answered Sep 30 '22 11:09

mipaaa