function readAll(filename) {
    var fso = new ActiveXObject("Scripting.FileSystemObject");
    var txtFile = fso.OpenTextFile(filename, 1, false, 0);
    var fText = txtFile.ReadAll();
	txtFile.Close();
	return fText;
}
	
shell.Run("cmd", 3, true, "/c dir | tee %TEMP%/output.log");
// editor.OpenFile("%TEMP%/output.log");

var temp = shell.GetEnv("TEMP");
var v = readAll(temp + "\\output.log");

OutputBar.writeln(v);
OutputBar.Visible = true;
OutputBar.SetFocus();