Code:
alias cmd {
  if (!$0) return
  var %wsh = wsh $+ $ticks 
  .comopen %wsh wscript.shell
  .comclose %wsh $com(%wsh,run,1,bstr*,% $+ comspec% /c $1- >cmd.txt,uint,0,bool,true)
  .signal cmd $1-
}
on *:signal:cmd:{ window -he @cmd | filter -fwpc cmd.txt @cmd | window -aw3 @cmd }


This is something I got from FiberOPtics a while back.

/cmd tracert 127.0.0.1