//Для непортабельной - обычной версии (или при желании) заменить в третьей строчке //"ProfD" на "CurProcD", т.к ProfD - это папка профиля, а CurProcD - папка установки Firefox. var profileDir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("ProfD", Components.interfaces.nsILocalFile) .path; var path = profileDir + "\\..\\PasswordfoxPortable.exe"; this. runPasswordfox = function (url) { var file = Components. classes["@mozilla.org/file/local;1"]. createInstance (Components.interfaces.nsILocalFile); var process = Components. classes ["@mozilla.org/process/util;1"]. createInstance (Components. interfaces. nsIProcess); file. initWithPath (path); process. init (file); if (!this. pid) this. pid = []; this. pid. push (process. run (false, url && [url]|| null, url && 1 || 0)); }; //Запуск левой кнопкой мыши this. runPasswordfox(""); |