【问题标题】:Custom URL Protocol with arguments is looking for the arguments inside Mozilla's directory带有参数的自定义 URL 协议正在寻找 Mozilla 目录中的参数
【发布时间】:2018-08-19 03:34:35
【问题描述】:

我有一个自定义 URL 协议来打开 Notepad++。当我在浏览器中输入

notepad++:C:\test.txt

Notepad++ 打开,但文件未打开。相反,我得到了这个错误

"C:\Program Files (x86)\Mozilla Firefox\notepad++:C:\test.txt cannot be opened"

我在 Google Chrome 中也遇到了类似的错误。

这是我的注册表项。

【问题讨论】:

    标签: html firefox browser registry


    【解决方案1】:

    根据设计,自定义 URL 协议将整个协议作为参数传递,整个字符串“notepad++:C:\test.txt”被传递给应用程序。 Firefox 的错误是因为参数不是完全限定的文件路径,它正在浏览器的工作目录中查找文件。解决这个问题的方法是解析掉“notepad++:”,例如使用脚本,然后让脚本使用正确的参数启动 notepad++。

    【讨论】:

      猜你喜欢
      • 2023-03-14
      • 1970-01-01
      • 2018-11-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多