2
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).
I tried the following two ways to remove double quotes, but neither worked:
Remove
"
:call set url=%%url:\"=%%
. This will cause the command to stop at\"
and IE will not appear.Strip the first and last character:
call set url=%%url:~1,-1%%
. Just doesn't changeurl
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) ?
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 – 2019-05-16T17:21:20.943
@BenN I'm just calling
window.open('ie:https://www.google.com')
in javascript. – CDT – 2019-05-17T00:08:50.293Could you try this JSFiddle? It works for me consistently.
– Ben N – 2019-05-17T00:22:52.450@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 – 2019-05-17T00:32:53.653Ah, 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 – 2019-05-17T00:49:11.717