Hi,
I need to run a process (an executable at certain location). I wrote
the simple function (see below)
the process runs, but unfortunately it seems that "initialization
path" for the executable (argument 0) is incorrect (It has to be the
app's directory, but it's not) and the application can not load it's
config file... how can I pass the path while running it?


code of the function:
function runFile(path) {
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance
(Components.interfaces.nsILocalFile);
file.initWithPath(path);
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance
(Components.interfaces.nsIProcess);
process.init(file);
pid = process.run(false);
//LOG(pid + "\n" + path);
}