I think that for XULrunner, CurProcD
is usually the installation path:
var path = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get("CurProcD", Components.interfaces.nsIFile).path;
Failing that, you might also try resource:app
.
Ref: File I/O at MDN.