【问题标题】:Custom URI scheme not working?自定义 URI 方案不起作用?
【发布时间】:2016-06-07 16:52:21
【问题描述】:

所以我为测试目的做了一个快捷方式,目标如下:

"C:\Program Files\uvnc bvba\UltraVNC\vncviewer.exe" -connect 111.222.333.444:1 -notoolbar -nostatus -quickoption 3

如您所见,我正在尝试将 ip 参数作为 %1 传递,但它是 not working(是的,我使用的是工作 ip,因为我使用我制作的快捷方式定期连接到它):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\vnc]
@="URL:vnc Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\vnc\shell\open\command]
@="\"C:\\Program Files\\uvnc bvba\\UltraVNC\\vncviewer.exe\" -connect %1:1 -notoolbar -nostatus -quickoption 3"

【问题讨论】:

  • 如果您将HKCR\vnc\shell\open\command 的程序路径更改为cmd /k echo %1,您会得到预期的结果吗?
  • @theB 它返回vnc:test
  • 那么这就是发送到 VNC 查看器的内容。我认为这不是有效的机器名称
  • @theB 不,就像我运行vnc:test 一样,这就是发生的事情。然后当我运行vnc://test 它返回vnc://test/

标签: windows registry uri uri-scheme


【解决方案1】:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\vnc]
@="URL:vnc Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\vnc\shell\open\command]
@="cmd /V:ON /C set address=%1 && set address=!address:~6,-2! && \"C:\\Program Files\\uvnc bvba\\UltraVNC\\vncviewer.exe\" -connect !address!-notoolbar -nostatus -noauto -8greycolors"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-17
    • 1970-01-01
    • 2021-01-09
    相关资源
    最近更新 更多