5

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.

albert
  • 8,112
  • 3
  • 47
  • 63
Kannan Karmegam
  • 651
  • 4
  • 12
  • 24

6 Answers6

5

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?

Community
  • 1
  • 1
crowhill
  • 2,398
  • 3
  • 26
  • 55
3

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.

Chris Done
  • 31
  • 1
2

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.

mipaaa
  • 797
  • 5
  • 7
0

You can use a URI Scheme, Google installs one by default as shared by Adam Fowler here:

http://www.adamfowlerit.com/2015/05/28/how-to-launch-a-url-in-google-chrome/

So you can create a link like this (note the space before the URL):

ChromeHTML:// www.bbc.co.uk

But it is broken! There's a bug report with Google, see Adam's article. It would be good to add some weight/comments to this bug if you want it fixed.

However your next decision depends on whether you have some control over the deployment of your web application because these bugs can be fixed using registry fixes.

Interestingly, if you can deploy registry fixes, in theory you could create your own URI schemes.

0

If you can modify the IE permissions on the PCs needed, you can use a javascript link to launch a process. Mine launches a custom program that launches chrome with command line switches and a URL, or opens a web page that indicates they need to contact IT to install Chrome on their PC:

javascript:(new ActiveXObject('Shell.Application')).ShellExecute('\\\\server\\path\\LaunchInChrome.exe', '-incognito --use-system-default-printer https://outlook.office365.com/owa/?realm=xxx http://webserver/MissingChrome.html');

But you could modify it to launch chrome.exe directly instead. You will need to enable Initialize and script ActiveX controls not marked as safe for scripting in the Intranet Zone (I wouldn't recommend this for any other zone).

NetMage
  • 26,163
  • 3
  • 34
  • 55
-1

you have to pass the parameter to chrome, something like this.

start chrome https://www.google.com/
Bender
  • 705
  • 11
  • 25