title: How to execute a command in already open CMD window using VBScirpt
body: <p>I am trying to automate backups that have to be done daily. I have a program running in CMD, which needs to be properly closed before running the backup.
  The two commands that it needs to close are:
  shutdown
  yes (to acknowledge the action)</p>
  
  <p>Then that CMD window can be closed, and I already have .bat file written to execute a backup.</p>
  
  <p>I have never written VBScripts except very very simple ones, so I am sorry if my question is not clear enough.</p>
  
  <p>The idea is this - using VBScript, type in both shutdown {Enter} and yes {Enter}, then close that CMD window, and then execute backup batch file, which already is set to start the CMD program once it is done backing up.</p>
  
  <p>Operating System - Windows XP Professional</p>
  
  <p>Thank you!</p>