Page 1 of 1

SOLVED: HTML file from Firefox Legacy

Posted: Sat Jul 18, 2026 4:34 pm
by Diamen
I’m launching AkelPad from Firefox Legacy (XUL/JS, nsIProcess) to edit an HTML file:
AkelPad.exe "C:\TEMP\file.htm"
If AkelPad is not running, it starts and opens the file correctly, also next.
If AkelPad is already running, the new process is created but the file is not opened in the existing instance.
I also tried: AkelPad.exe /OpenFile("C:\TEMP\file.htm")
but the behavior is the same when AkelPad is already open.
Is there a recommended way to send a file to an existing AkelPad instance from an external application?

Re: HTML file from Firefox Legacy

Posted: Sat Jul 18, 2026 7:38 pm
by Infocatcher
I think, this comes from SingleOpenProgram AkelPad option.
With SingleOpenProgram=1 following works fine for me:

Code: Select all

var path = "X:\\AkelPad\\AkelPad.exe";
var args = ["X:\\test.html"];

var file = Components.classes["@mozilla.org/file/local;1"]
	.createInstance(Components.interfaces.nsILocalFile || Components.interfaces.nsIFile);
file.initWithPath(path);
var process = Components.classes["@mozilla.org/process/util;1"]
	.createInstance(Components.interfaces.nsIProcess);
process.init(file);
process.runw(false, args, args.length);

Re: HTML file from Firefox Legacy

Posted: Sat Jul 18, 2026 8:18 pm
by Diamen
Here not work withSingleOpenProgram = 0 or 1 or 2
But it is a bug?
I need to open file from firefox like I can with cli.

Re: HTML file from Firefox Legacy

Posted: Thu Jul 30, 2026 12:49 pm
by Лестер Глючный
Are you've disabled UAC and launching firefox without -no-deelevate command line option?

Re: HTML file from Firefox Legacy

Posted: Fri Jul 31, 2026 4:03 am
by Diamen
disabled UAC and launching firefox without -no-deelevate command line option.

Re: HTML file from Firefox Legacy

Posted: Fri Jul 31, 2026 7:42 am
by Diamen
Solved.
it happens when start akelpad without UAC and Firefox With UAC.
Ty for support.

Re: HTML file from Firefox Legacy

Posted: Fri Jul 31, 2026 7:42 am
by Diamen
Solved.
it happens when start akelpad without UAC and Firefox With UAC.
Ty for support.