Google chrome extension 如何从google chrome和firefox调用Windows应用程序?

Google chrome extension 如何从google chrome和firefox调用Windows应用程序?,google-chrome-extension,firefox-addon,Google Chrome Extension,Firefox Addon,我想从google chrome或Firefox调用Windows(仅限7/Vista/XP)应用程序。我正在考虑做一个插件来做这个。我可以查阅这里提到的教程。但是,在此之前,我想知道是否可以从这些浏览器调用windows应用程序。做这样的事明智吗 Chrome上的(Firefox也支持npapi) 您有NPAPI(c扩展名)可以直接调用操作系统 从npapi调用ShellExecuteEx Firefox上的 您还可以调用此操作系统命令 来自上面url的示例 // create an ns

我想从google chrome或Firefox调用Windows(仅限7/Vista/XP)应用程序。我正在考虑做一个插件来做这个。我可以查阅这里提到的教程。但是,在此之前,我想知道是否可以从这些浏览器调用windows应用程序。做这样的事明智吗

Chrome上的(Firefox也支持npapi)

您有NPAPI(c扩展名)可以直接调用操作系统

从npapi调用
ShellExecuteEx

Firefox上的

您还可以调用此操作系统命令

来自上面url的示例

// create an nsILocalFile for the executable
var file = Components.classes["@mozilla.org/file/local;1"]
                     .createInstance(Components.interfaces.nsILocalFile);
file.initWithPath("c:\\myapp.exe");

// create an nsIProcess
var process = Components.classes["@mozilla.org/process/util;1"]
                        .createInstance(Components.interfaces.nsIProcess);
process.init(file);

// Run the process.
// If first param is true, calling thread will be blocked until
// called process terminates.
// Second and third params are used to pass command-line arguments
// to the process.
var args = ["argument1", "argument2"];
process.run(false, args, args.length);

文档中说,
NPAPI插件对扩展的支持已经停止。