3

In order to launch Internet Explorer from chrome in format ie:https://example.com, I have added the following registry:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\ie]
"URL Protocol"="\"\""
@="\"URL:IE Protocol\""

[HKEY_CURRENT_USER\Software\Classes\ie\shell]

[HKEY_CURRENT_USER\Software\Classes\ie\shell\open]

[HKEY_CURRENT_USER\Software\Classes\ie\shell\open\command]
@="cmd /K set url=\"%1\" & call set url=%%url:ie:=%% & call start iexplore %%url%%"

However, it works okay first time launching IE, but failed on the second time due to the double quotes in url(might be a bug for IE). enter image description here

I tried the following two ways to remove double quotes, but neither worked:

  1. Remove ": call set url=%%url:\"=%%. This will cause the command to stop at \" and IE will not appear.

  2. Strip the first and last character: call set url=%%url:~1,-1%%. Just doesn't change url at all.

So how can I remove the double quotes in a cmd script in registry? Or is there another workaround to launch IE in chrome(with minimum effort) ?

5
  • Hmm, your original strategy works for me. Could you please be more specific about what you're doing in Chrome that causes Internet Explorer to open with the misquoted URL?
    – Ben N
    May 16, 2019 at 17:21
  • @BenN I'm just calling window.open('ie:https://www.google.com') in javascript.
    – CDT
    May 17, 2019 at 0:08
  • Could you try this JSFiddle? It works for me consistently.
    – Ben N
    May 17, 2019 at 0:22
  • @BenN Thanks, same result. Opening the first IE is okay, but if I don't close the first IE window and click Launch IE again, the second IE window's url will behttp://%22https//www.google.com%22.
    – CDT
    May 17, 2019 at 0:32
  • Ah, my mistake - I hadn't realized the problem only occurred when one Internet Explorer window was still open. I've now posted an answer that fixes this for me.
    – Ben N
    May 17, 2019 at 0:49

2 Answers 2

3

It looks like something is going wrong when Internet Explorer detects multiple instances and presumably tries to do something special in that case. There are command-line options to control "merging" behavior, specifically -nosessionmerging and -noframemerging. When I supply those, I can successfully launch additional Internet Explorer windows.

Also, if you'd like the command prompt to go away after the launch, you can use the /c switch instead of /k. Applying these changes and cleaning up extra quotes from other values gives us this updated Registry file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\ie]
"URL Protocol"=""
@="URL:IE Protocol"

[HKEY_CURRENT_USER\Software\Classes\ie\shell]

[HKEY_CURRENT_USER\Software\Classes\ie\shell\open]

[HKEY_CURRENT_USER\Software\Classes\ie\shell\open\command]
@="cmd /c set url=\"%1\" & call set url=%%url:ie:=%% & call start iexplore -nosessionmerging -noframemerging %%url%%"
3
  • Great solution, saved my day! I never know iexplore have these arguments.
    – CDT
    May 17, 2019 at 0:55
  • Seems this works on Windows 10 but not on Windows 7.
    – CDT
    May 30, 2019 at 0:47
  • @CDT Hmm, does the exact same behavior (mangled quotes on subsequent launches) reappear? Do the Internet Explorer versions match between the Windows 10 and Windows 7 machines?
    – Ben N
    May 30, 2019 at 17:22
0

I used the following so that I can open file:// links in Chrome

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\ie]
"URL Protocol"=""
@="URL:IE Protocol"

[HKEY_CURRENT_USER\Software\Classes\ie\shell]

[HKEY_CURRENT_USER\Software\Classes\ie\shell\open]

[HKEY_CURRENT_USER\Software\Classes\ie\shell\open\command]
@="cmd /c set url=\"%1\" & call set url=%%url:ie:=%% & call start iexplore.exe -nosessionmerging -noframemerging -extoff %%url%%"

For example:

<a href="ie:file://server/log/Log.mdb">Test</a>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .