14

I want to have a link in Chrome e.g.

Open Link

that when you click on it in the Chrome Browser that it launches the link in an IE window.

Can anyone explain how to do this. I believe it is possible and may involve adding some settings in the registry

ps: I can't use any browser extension e.g. IETab or any of this. It has to launch the IE on the machine.

topcat3
  • 2,561
  • 6
  • 33
  • 57
  • 1
    possible duplicate of [Open IE browser in Firefox/Chrome page](http://stackoverflow.com/questions/10070744/open-ie-browser-in-firefox-chrome-page) – Dan Smith Feb 26 '15 at 13:49
  • I already looked at that link but no one gives example of a batch file and the registry settings answer doesn't explain in a good way how to add these. Looking for a concrete example if anyone has – topcat3 Feb 26 '15 at 13:53
  • 1
    Found this, looks useful: https://msdn.microsoft.com/en-us/library/ie/aa767914%28v=vs.85%29.aspx – Dan Smith Feb 26 '15 at 14:02
  • Thanks, I had also found this and tried to follow it but I can't understand it fully. I wish there was a step by step guide on how to add the keys to the registry and then what to reference in a html page. – topcat3 Feb 26 '15 at 14:08
  • Got that guide working Bulk but it passes the %1 as alert so link it tries to launch is alert:http://www.google.ie/ . looking into how to change that bit now – topcat3 Feb 26 '15 at 15:09
  • You can [create a protocol handler](http://stackoverflow.com/a/41749105/725866) – Jeremy Danyow Jan 20 '17 at 16:56
  • without creating handler is it possible to launch IE from chrome? – Praveen Gopal Sep 06 '18 at 08:40
  • @PraveenGopal above is the only way I could find but maybe someone else may know – topcat3 Sep 06 '18 at 09:11

8 Answers8

11

Ok so I did the following which works :

HKEY_CLASSES_ROOT
   alert
      (Default) = "URL:Alert Protocol"
      URL Protocol = ""
      DefaultIcon
         (Default) = "iexplore.exe,1"
      shell
         open
            command
               (Default) = cmd /k set myvar=%1 & call set myvar=%%myvar:alert:=%% & call "C:\Program Files (x86)\Internet Explorer\iexplore.exe" %%myvar%% & exit /B

Then have your link

<a href="alert:www.google.ie">link</a>
topcat3
  • 2,561
  • 6
  • 33
  • 57
  • 3
    can you please provide us the details information how are you using this script to open a link in IE from chrome browser. – saravanakumar Jul 25 '16 at 19:25
  • @saravanakumar you want to know why I want to do this? It is for an application that is running in Chrome but links to another application that only runs in IE – topcat3 Jul 26 '16 at 10:03
  • 3
    i want to know how you have implemented this is in web application and details steps for creating HKEY handler in windows – saravanakumar Jul 26 '16 at 13:31
  • @topcat3 This solution working fine on windows 7, but not on windows 10. Can suggest an alternative for windows 10 ? – Madhur Sodhi Feb 23 '17 at 11:42
  • @MadhurSodhi is the path to your IE still C:\Program Files (x86)\Internet Explorer\iexplore.exe ? – topcat3 Feb 23 '17 at 14:28
  • @topcat3 I am using this path "%ProgramFiles%\Internet Explorer\iexplore.exe" and it's the correct path to IE. The real issue is when the link is clicked a windows popup comes up that states "you will need new app to open this alert" – Madhur Sodhi Feb 24 '17 at 07:18
  • @MadhurSodhi sounds strange. it may be the case that windows 10 chrome combination has blocked this. I'm not too sure of a workaround at the moment. can you try the original code with IE 32bit as in example – topcat3 Feb 24 '17 at 09:52
  • @topcat3 This works for me, But It always shows alert to open IE can't we remove that alert? Any help? – Sutirth Jan 30 '18 at 12:04
  • @topcat3 Hi, I have removed alert: part but still no hope. can you please suggest exactly from where to remove. Thanks! – Sutirth Feb 21 '18 at 12:50
  • @Sutirth emove & call set myvar=%%myvar:alert:=%% – topcat3 Feb 21 '18 at 15:22
  • CANNOT HANDLE SPECIAL CHARACTERS `example.com?a=1&b=2` will be stripped to `example.com?a=1` – CDT May 16 '19 at 08:45
  • I got this working with chrome, but it doesn't work on ms edge. Is there something else to be done if I have to get this working on MS edge? – pranag Nov 18 '19 at 08:52
  • Do you mean create a .reg file and let user register url scheme for opening by other application by themselves? – Ori.Lin Feb 13 '20 at 06:48
  • @Ternence.Lin yes save the script as a .reg – topcat3 Feb 13 '20 at 14:59
6

All answers above mention HKEY_CLASSES_ROOT, but how do we use it? Where to use it? It is not mentioned.

But now I have the solution please follow the below steps.

  1. Open New Notepad and Paste below code in Notepad
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\iehttp]
@="URL:Open with IE Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\iehttp\shell]
[HKEY_CLASSES_ROOT\iehttp\shell\open]
[HKEY_CLASSES_ROOT\iehttp\shell\open\command]
@="cmd /V /C \"set URL=%1&& set URL=!URL:iehttp=http!&&cmd /c \"\"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe\"\" !URL!\""
  1. Ctrl + s
  2. Give Name like: iphttp.reg + Save in desktop
  3. After that double click on iphttp.reg file from the desktop, first popup click on Yes

Done from the Registry side no need to refresh or restart the computer. It will give two links for testing:

 <a href="http://www.google.com" target="_blank">Open Same Browser</a>
 <a href="iehttp://www.google.com">Open With IE</a>

That's IT. It is working fine now.

Limitation: from Jquery, Javascript it's not working as per my understanding.

Roberto Caboni
  • 7,252
  • 10
  • 25
  • 39
vishal joshi
  • 77
  • 1
  • 2
  • In case if you face & challenge then use this one @="cmd /V /C set "URL=%1" & set URL=!URL:iehttp:=! & "!ProgramFiles(x86)!\Internet Explorer\iexplore.exe" !URL!" don't use this one @="cmd /V /C \"set URL=%1&& set URL=!URL:iehttp=http!&&cmd /c \"\"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe\"\" !URL!\"" – vishal joshi May 27 '20 at 11:12
  • 3
    The only answer that explains the solution - thanks! – japes Sophey Jun 10 '20 at 09:10
3

Building on the responses from @topcat3 and @danieln above, I tweaked the solution to get rid of the annoying lingering DOS window. Here's what works nicely for me:

HKEY_CLASSES_ROOT
    alert
    (Default) = "URL:Alert Protocol"
    URL Protocol = ""
    DefaultIcon
        (Default) = "iexplore.exe,1"
    shell
        open
            command
                (Default) = cmd /v /k set "myvar=%1" & set myvar=!myvar:alert:=! & start "" /B "!ProgramFiles!\Internet Explorer\iexplore.exe" !myvar! & exit
malcolmct
  • 31
  • 1
3

Starting with Chrome 74, legacy browser support (LBS) is built into chrome. The behavior meets the needs you describe, i.e. (pun intended) certain URLs are opened in a new Internet Exploder window, and not in a tab in Chrome.

From Google's official site on LBS:

As an administrator, you can automatically switch users between Chrome Browser and another browser. Deploy Legacy Browser Support (LBS) and use policies to specify which URLs open in an alternative browser. For example, you can ensure that browser visits to the internet use Chrome Browser, but visits to your organization’s intranet use Internet Explorer®.

For older versions of Chrome (≤73), a separate install is needed, namely the "legacy browser support extension". The P.S. to the question explicitly excludes browser extensions, but the reason seemed to be that clicking on the link should open a separate IE window.

Community
  • 1
  • 1
Hermann.Gruber
  • 1,257
  • 1
  • 12
  • 37
2

Great solution @topcat3! To fix it for IE11, the link must contain https:// or http://:

<a href="alert:https://www.google.com">open google in IE</a>

And I tweaked the registry command with the ProgramFiles variable:

cmd /k set myvar=%1 & call set myvar=%%myvar:alert:=%% & call "%%ProgramFiles%%\Internet Explorer\iexplore.exe" %%myvar%% & exit /B
DanielN
  • 21
  • 1
1

Simplified solution above from @topcat3 and made it work on Win10.

HKEY_CLASSES_ROOT
    alert
    (Default) = "URL:Alert Protocol"
    URL Protocol = ""
    DefaultIcon
        (Default) = "iexplore.exe,1"
    shell
        open
            command
                (Default) = cmd /V /C set "arg1=%1" & set arg1=!arg1:alert:=! & "!ProgramFiles(x86)!\Internet Explorer\iexplore.exe" !arg1!
Dig
  • 11
  • 1
0

You can use ie-tab for chrome. It invokes an IE frame inside your chrome browser. Worked good for me.

Marian Nasry
  • 821
  • 9
  • 22
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Sneha Oct 18 '17 at 10:29
  • While this may help for similar scenarios, topcat3 explicitly disqualified this solution in the post scriptum (p.s.) to the question. – Hermann.Gruber Sep 23 '19 at 06:47
0

You can use the following code tweaked for ftp links for IE.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\iehttp]
@="URL:Open with IE Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\iehttp\shell]
[HKEY_CLASSES_ROOT\iehttp\shell\open]
[HKEY_CLASSES_ROOT\iehttp\shell\open\command]
@="cmd /V /C \"set URL=%1&& set URL=!URL:iehttp=ftp!&&cmd /c \"\"C:\\Program     Files (x86)\\Internet Explorer\\iexplore.exe\"\" !URL!\""