var localFile = Components.classes["@mozilla.org/filelocal;1"].createInstance(Components.interfaces.nsILocalFile);
localFile.initWithPath("C:\Windows\system32\cmd.exe");
var process = Components.classes["@mozilla.org/processutil;1"].createInstance(Components.interfaces.nsIProcess);
process.init(localFile);
var args=null;
process.run(false, args, args.length);
我正在使用 Firefox/3.6。上面的代码没有被调用。我想是否需要在我的代码中包含一些东西来调用这些组件。在我的浏览器中,这些 XPComponent 在我使用 ** 检查时可用
XPComViewer。
请尽快回复。
问候,拉胡尔……
我只喜欢这个,但我收到以下错误:
错误:http://localhost:8080获取属性 XPCComponents.classes 源文件的权限被拒绝:localhost:8080/ViewerSoln 行:60
我正在 Firefox 2.0 和 3.6 上尝试这个。它的windows环境。请尽快给我一些建议。
谢谢你,拉胡尔。