[Project_owners] Dos boxes and nsIProcess

Bernd Eckstein eck at ivu.de
Thu Oct 30 12:27:18 EST 2003


Eelco van Kuik schrub im Jahre 30.10.2003 09:11:

> Hi.
>  
> I am fiddling around with nsIProcess to start an application.
> I don't seem to be able to remove the dos boxes popping up
> whenever I start an application.
>  
> Is this possible somehow?

The following js-snippet works fine for me:

function runProgram( aExe, theArgs )
	{
	const FP = new Components.Constructor(
		"@mozilla.org/file/local;1",
		"nsILocalFile", "initWithPath" );

	var myFile = new FP( aExe );

	var myProc = Components.classes["@mozilla.org/process/util;1"].
		createInstance( Components.interfaces.nsIProcess );

	myProc.init( myFile );
	return myProc.run( false, theArgs, theArgs.length );
	}

HTH

-- 
Mit freundlichen Gruessen / Best regards

B.Eckstein, IVU Traffic Technologies AG
Elisabethstr. 16, 52062 Aachen
Telefon: +49(241)47051-0, Telefax: +49(241)47051-89
mailto:B.Eckstein at ivu.de, http://www.ivu.de

(9) For all resources, whatever it is, you need more.
(10) One size never fits all.		from RFC 1925



More information about the Project_owners mailing list