私はこのスレッドと他の Firefox拡張機能でローカルexeを実行する方法を読みました
問題は、Firefox 4.0.1の展開時および使用時に、.xpi拡張子をインストールすると、xpiが圧縮形式である****。xpiとして\ Profiles ...\extensions内に配置されることです。
すべてのソリューションは、拡張子がフォルダーに配置されていることを前提としているため、フォルダーにそのままアクセスしていますが、これはできません。
たとえば、この男は言います
//**** get profile folder path ****
var dsprops = Components.classes['@mozilla.org/file/directory_service;1']
.getService(Components.interfaces.nsIProperties);
var ProfilePath = dsprops.get("ProfD", Components.interfaces.nsIFile).path;
//**** initialize file ****
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(ProfilePath);
//**** append each step in the path ****
file.append("extensions");
file.append("guid");
file.append("sample.exe");
私の場合のguidは、{f13b157f-b174-47e7-a34d-4815ddfdfeb8} .xpiとしてインストールされますが、この方法ではアクセスできません。