[Project_owners] Dos boxes and nsIProcess

Pete Collins pete at mozdev.org
Thu Oct 30 09:50:06 EST 2003


Or using jslib:

var fu = new FileUtils();

// On windows
fu.run("C:\\WINDOWS\\notepad.exe");

// On unix
fu.run("/usr/X11R6/bin/Eterm", ['-e/usr/bin/vi']);

--pete




Eelco van Kuik wrote:
> Thanks
> 
> 
>>-----Original Message-----
>>From: Bernd Eckstein [mailto:eck at ivu.de] 
>>Sent: donderdag 30 oktober 2003 12:27
>>To: moz-needlesearch at planet.nl; Mozdev Project Owners List
>>Subject: Re: [Project_owners] Dos boxes and nsIProcess
>>
>>
>>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
>>
> 
> 
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 


-- 
Pete Collins
www.mozdev.org
www.mozdevgroup.com




More information about the Project_owners mailing list