title: Visual Basic CMD command from textbox input
body: <p>I want to try something,this isn't the official project.
  So the users adds the webpage and lets say we name it %1 the code take that and the output is "ping %1" and press enter key.</p>
  
  <p>What I've done so far</p>
  
  <pre><code>Public Class Form3
  
  
      Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  
      End Sub
  
      Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
      End Sub
  
      Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
          Dim textvar As String = TextBox1.Text
          Shell("CMD.exe")
          SendKeys.Send("ping") 'textvar') '{ENTER}')
  
      End Sub
  End Class
  </code></pre>
  
  <p>The output of that is an empty cmd window or crash.Any idea on how to fix that?</p>
  
  <p>Update: Also i tried    </p>
  
  <pre><code>SendKeys.Send("ping") 'textvar')
  SendKeys.Send("{ENTER}")
  </code></pre>
  
  <p>but the output is 3 cmd windows 1 of them empty the other 2 split the "ping" word </p>