I have a Custom URL Protocol to open Notepad++. In the browser when I type
notepad++:C:\test.txt
Notepad++ opens but the file does not open. Instead I get this error
"C:\Program Files (x86)\Mozilla Firefox\notepad++:C:\test.txt cannot be opened"
I get a similar error in Google Chrome too.
Here is my registry entry.
The custom URL protocol, by design, passes in the entire protocol as parameters and the entire string "notepad++:C:\\test.txt" gets passed to the application. The errors from Firefox are because the argument is not a fully qualified file path, and it's looking for the file inside the working directory of the browser. The way around this is to parse away the "notepad++:", such as with a script, and then have the script launch notepad++, with the correct parameters.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.