Skip to content

Instantly share code, notes, and snippets.

@pwlin
Created April 7, 2010 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwlin/358841 to your computer and use it in GitHub Desktop.
Save pwlin/358841 to your computer and use it in GitHub Desktop.
// Mozilla - Run an external process
var fileExe = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
fileExe.initWithPath("c:\\windows\\explorer.exe");
var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
process.init(fileExe);
var args = [] ;
/*
var args = new Array();
args[0] = "";
args[1] = "";
args[2] = "";
args[3] = "";
*/
process.run(true, args, args.length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment