I've followed these steps and it doesn't work correctly for me. Custom protocol handler in chrome
Basically, I don't have a custom app. I just want to create an handler to open IE with a specific URL.
Here are my reg:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\ie]
"URL Protocol"="\"\""
@="\"URL:IE Protocol\""
[HKEY_CURRENT_USER\Software\Classes\ie\DefaultIcon]
@="\"explorer.exe,1\""
[HKEY_CURRENT_USER\Software\Classes\ie\shell]
[HKEY_CURRENT_USER\Software\Classes\ie\shell\open]
[HKEY_CURRENT_USER\Software\Classes\ie\shell\open\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" \"%1\""
It's working but... when I'm opening ie:www.google.com from Chrome, it ask to open IE but it keeps the "ie:" in the opened URL... which generate a endless loop.
How can I fix that?
Thanks
Open Chrome URLs from desktop shortcuts. Just create a desktop shortcut with this address: "C:\Program Files\Google\Chrome\Application\chrome.exe" --new-window chrome-extension://dbbbifdnlcppldcgbfopgpcienlemhnm/open.html?key=chromeurls#settings/passwords Change settings/passwords with desired url!
save this script as internet-explorer-protocol-handler.reg
:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\ie]
"URL Protocol"="\"\""
@="\"URL:IE Protocol\""
[HKEY_CURRENT_USER\Software\Classes\ie\DefaultIcon]
@="\"explorer.exe,1\""
[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 myvar=%1 & call set myvar=%%myvar:ie:=%% & call \"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe\" %%myvar%% & exit /B"
Then run the script to install the keys in your registry. It will look like this:
Now links that use the ie:
protocol will open in Internet Explorer.
<a href="ie:https://www.google.com/">Google</a>
Demo Page
After few tests, I move to another strategy. I'm targetin an intermediate batch script instead. And the batch split the protocol and the url, and open IE.
Here is the batch:
echo %1%
set var=%1
set var=%var:~4,-1%
Start "" "%ProgramFiles%\Internet Explorer\iexplore.exe" %var%
Here is a solution that should solve the problem with extended url's that contain parameters and special characters (&, % etc.)
Like this: https://www.google.com/search?q=open-internet-explorer-from-chrome-using-a-protocol-handler&oq=open-internet-explorer-from-chrome-using-a-protocol-handler&aqs=chrome..69i57j69i60l3.1754j0j4&sourceid=chrome&ie=UTF-8
Replace the command in reg file with this:
powershell -windowstyle hidden -command "& {$Url = '%1' ; $Url = $Url -replace 'ie:',''; $IE=new-object -com internetexplorer.application ; $IE.navigate2($Url) ; $IE.visible=$true }"
Working 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 /c set url=\"%1\" & call set url=%%url:ie:=%% & call start iexplore -nosessionmerging -noframemerging %%url%%"
Some important notes:
%1
in double quotes. Otherwise url with multiple params like example.com?a=1&b=2
will be stripped to example.com?a=1
, params after &
will be ignored. iexplore
. If you don't remove the double quotes and open multiple IE window from chrome, only the first IE window will get the correct URL. But removing quotes with command set url=%%url:\"=%%
or set url=%%url:~1,-1%%
doesn't work.-nosessionmerging
and -noframemerging
to iexplore
. These are command-line options to control "merging" behavior for IE.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With