title: Run cmd command from vb.net button
body: <p>I have a simple question that i haven't been able to find the answer to.
  I have a cmd line program (tap). i have set the path in the environment variable so i can run it from the cmd prompt without issue.</p>
  
  <p>it looks like this:</p>
  
  <blockquote>
    <p>tap -u load file1 file2</p>
  </blockquote>
  
  <p>how do i run this via button click in vb.net?</p>
  
  <p>Here's what i have so far...</p>
  
  <pre><code>  Private Sub Flash_Click(sender As Object, e As EventArgs) Handles flashBundle.Click
          'If (String.Compare(imageTextBox.Text, "") &lt;&gt; 0) And (String.Compare(radioTextBox.Text, "") &lt;&gt; 0) Then
          Dim pi As New ProcessStartInfo("C:\p4\main\armos\common\tools\tap.exe")
          pi.WorkingDirectory = "C:\p4\main\armos\common\tools\"
          pi.Arguments = ("-u load " + imageTextBox.Text + " " + radioTextBox.Text)
          Process.Start(pi)
          'End If
      End Sub
  </code></pre>
  
  <p>The cmd window flashes and the program doesn't execute.</p>
  
  <p>Thanks in advance.</p>