title: How to automate telnet and ftp in windows vbscript effectively with using wscript sendkeys
body: <p>I am running the following VBScript file:</p>
  
  <pre><code>set WshShell = WScript.CreateObject("WScript.Shell")
  WshShell.run("telnet.exe 10.10.10.10")
  WScript.Sleep 500
  WshShell.SendKeys"root"
  WshShell.SendKeys("{Enter}")
  WScript.Sleep 500
  WshShell.SendKeys"root123"
  WshShell.SendKeys("{Enter}")
  WScript.Sleep 500
  WshShell.SendKeys"cd /code &amp;&amp; make"
  WshShell.SendKeys("{Enter}")
  WScript.Sleep 5000
  WshShell.SendKeys"ls -lrt"
  WshShell.SendKeys("{Enter}")
  </code></pre>
  
  <p>But I feel that, while executing, this it will pop up command prompt. It will keep on sending keys to the command prompt windows at an interval of 500 milliseconds. While doing this if I click another window, than this script will start sending keys to that other window instead of the command prompt.</p>
  
  <p>Is there any other way to do telnet automation without SendKeys function?</p>