title: Send multiple TELNET commands in cmd
body: <pre><code>class Program
  {
      public static void ExecuteCommand(string Command)
      {
          ProcessStartInfo ProcessInfo;
          Process Process;
  
          ProcessInfo = new ProcessStartInfo("cmd.exe", "/C " + Command);
          ProcessInfo.CreateNoWindow = false;
          ProcessInfo.UseShellExecute = false;
          Process = Process.Start(ProcessInfo);
          Process.WaitForExit();
  
          Process.Close();
  
  
      }
  
  
  
      static void Main()
      {
  
          ExecuteCommand("telnet 169.254.0.1");
  
  
      }
  }
  </code></pre>
  
  <p>It runs cmd and connects to a specific device via telnet. Next, once connected, it prompts for login and password which I would also like to send, and after that few specific commands. What should I do?</p>
  
  <p>Many thanks! </p>