0%

在網頁上開啟應用程式

 
chrome

今天整理電腦 , 自己的電腦剛好有些 URL Protocol 壞掉 , 導致以前可以在 web 上面開的程式都爆炸 , 隨手筆記下
參考 這篇 or 這篇
新增一個 reg 檔 , 看要自訂啥名稱 , 我這裡用 Notepad

1
2
3
4
5
6
7
8
9
10
11
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Notepad]
"URL Protocol"=""

[HKEY_CLASSES_ROOT\Notepad\shell]

[HKEY_CLASSES_ROOT\Notepad\shell\open]

[HKEY_CLASSES_ROOT\Notepad\shell\open\command]
@="\"C:\\Program Files (x86)\\Notepad++\\notepad++.exe\""

如果想要加上傳入參數的話可以改這樣

1
@="\"C:\\Program Files (x86)\\Notepad++\\notepad++.exe\" \"%1\""

接著搞個網頁來測試看看 , 特別注意到 href 的地方是關鍵

1
2
3
4
5
6
7
8
9
10
11
12
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>notepad</title>
</head>
<body>
<a href="notepad:\\">notepad</a>
</body>
</html>

最後也可以搭配 Chrome 的 Bookmark
新增名稱 Notepad => 接著輸入網址 notepad:\\ 就可以直接在 Chrome 上面快速開啟常用的軟體了
萬一書籤太多想要匯出可以參考這裡

關閉