加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows – 如何让Internet Explorer正确处理自定义协议处理程序

发布时间:2020-12-14 04:25:17 所属栏目:Windows 来源:网络整理
导读:我想要一个我正在开发的网站,在ssh://0.0.0.0类型网址上打开PuTTY.我在Chrome和Firefox中使用此功能,但在Internet Explorer中出现以下错误: Windows cannot access the specified device,path,or file. You may not have the appropriate permissions to a
我想要一个我正在开发的网站,在ssh://0.0.0.0类型网址上打开PuTTY.我在Chrome和Firefox中使用此功能,但在Internet Explorer中出现以下错误:

Windows cannot access the specified device,path,or file. You may not have the appropriate permissions to access this item.

其次是:

Unable to open this helper application for ssh://0.0.0.0/.

The protocol specified in this address is not valid. Make sure the address is correct,and try again.

这是我的注册表项:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTssh]
@="URL:SSH Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOTsshshell]

[HKEY_CLASSES_ROOTsshshellopen]

[HKEY_CLASSES_ROOTsshshellopencommand]
@="cmd /k set in="%l" & call set in=%%in:ssh:=%% & call set in=%%in:/=%% & call "C:Program Files (x86)PuTTYputty.exe" %%in%% & exit"

我做了一个快速实验,看起来问题是由于cmd和调用.一旦我删除它们,我就会得到预期的结果.但是,我仍然需要将字符串操作作为PuTTY(对于使用RealVNC VNC Viewer的vnc url,情况相同)只需要没有协议前缀的主机.

编辑:它似乎只是导致问题的cmd. call可以与预期的行为一起使用.

解决方法

我想Internet Explorer调用cmd.exe存在权限问题.相反,我不得不完全开始使用PowerShell.这是工作的注册表项,绝对没有其他脚本或PuTTY程序修改,在我在网上找到的一些解决方法中显示:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTssh]
@="URL:SSH Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOTsshshell]

[HKEY_CLASSES_ROOTsshshellopen]

[HKEY_CLASSES_ROOTsshshellopencommand]
@="C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -Command "$uri = [System.Uri]'%l';&"${env:ProgramFiles}PuTTYputty.exe" -P $uri.Port $uri.GetComponents([System.UriComponents]::UserInfo -bor [System.UriComponents]::Host,[System.UriFormat]::UriEscaped)""

我现在可以从所有三个主要浏览器打开SSH和VNC链接.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读