1.新建文件 openIE.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\openIE]
@="URL:Alert Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\openIE\DefaultIcon]
@="iexplore.exe,1"
[HKEY_CLASSES_ROOT\openIE\shell]
[HKEY_CLASSES_ROOT\openIE\shell\open]
[HKEY_CLASSES_ROOT\openIE\shell\open\command]
@="cmd /c set m=%1 & \"C:\\Program Files\\openIE\\openIE.bat\" %%m%% & exit"
// iexplore.exe 要跳转的应用
// 这里的openIE可以改为其他名字,与第四步调用时一致即可
// 最后一行 C:\\Program Files\\openIE 为第二步openIE.bat的路径,可以改为其他地址
2.C:\Program Files下新建文件夹openIE,文件夹内新建文件openIE.bat
@echo off
set m=%m:openIE:=%
set m="%m:separator=&%"
start "" "C:\\Program Files\\Internet Explorer\\iexplore.exe" %m%
exit
// 第四行为要跳转的应用安装路径
3.双击运行openIE.reg,添加注册表
4.跳转应用
// 跳转应用
top.location = "openIE:"
// 跳转应用并打开本地文件
top.location = "openIE:file:///C:/Users/admin/Desktop/index.html"
// 跳转应用并打开网址
top.location = 'openIE:https://www.baidu.com'