js執行本地exe程式

2021-10-08 21:02:34 字數 1199 閱讀 8987

try

catch

(error

)

寫入登錄檔

新建read.reg檔案,編寫如下**。

windows registry editor version 5.00

[hkey_classes_root\myprotocol]

@="myprotocol protocol"

"url protocol"=""

[hkey_classes_root\myprotocol\defaulticon]

@="c:\users\administrator\desktop\ie10.exe"

[hkey_classes_root\myprotocol\shell]

@=""

[hkey_classes_root\myprotocol\shell\open]

@=""

[hkey_classes_root\myprotocol\shell\open\command]

@="\"c:\\users\\administrator\\desktop\\ie10.exe\""

儲存,並執行reg檔案。

執行完成後,確認登錄檔已註冊。

win+r,輸入regegit回車。

編寫html檔案。

<

!doctype html>

"en"

>

"utf-8"

>

"viewport" content=

"width=device-width, initial-scale=1.0"

>

執行exe<

/title>

<

/head>

"myprotocol://"

>

執行桌面上的ie10.exe程式

<

/a>

<

/body>

<

/html>

執行如圖。

js呼叫本地exe檔案

執行時需要去掉注釋 windows registry editor version 5.00 hkey classes root pw pw 協議名稱 pw protocol pw 協議路徑 url protocol hkey classes root pw defaulticon pw 協議名稱 ...

ubuntu執行exe程式

以採集器舉例 1 更新源 sudo apt get update sudo apt get upgrade sudo apt get install python software properties sudo apt get install software properties common ...

js啟動exe程式

1.匯出 新增登錄檔 a.輸入regedit開啟登錄檔編輯器 b.匯出登錄檔 c.修改登錄檔,新增 hkey classes root myprotocol myprotocol protocol url protocol hkey classes root myprotocol defaultic...