title: vb.net : how to get result from cmd to textbox
body: <p>i trying to run this command in cmd and get the result to my textbox4.text without success 
  command : cscript  "%windir%\system32\slmgr.vbs" /xpr | findstr /S /M /I /C:"permanently"</p>
  
  <p>result in need to get in my textbox4 : 
  The machine is permanently activated.</p>
  
  <p>i write this code without success : </p>
  
  <pre><code>    Dim qassam As String
  
      qassam = Shell("whoami")
      TextBox4.Text = CStr(qassam)
  </code></pre>
  
  <p>and also i found this but not working : </p>
  
  <pre><code> Dim oProcess As New Process()
      Dim oStartInfo As New ProcessStartInfo("cmd.exe", "cscript %windir%\system32\slmgr.vbs /xpr | findstr /S /M /I /C:permanently ")
      oStartInfo.UseShellExecute = False
      oStartInfo.RedirectStandardOutput = True
      oProcess.StartInfo = oStartInfo
      oProcess.Start()
  
      Dim sOutput As String
      Using oStreamReader As System.IO.StreamReader = oProcess.StandardOutput
          sOutput = oStreamReader.ReadToEnd()
      End Using
  
      TextBox4.Text = sOutput   'txtOutput being the output textbox.
  </code></pre>
  
  <p>im new at vb.net i need simple code please to understand </p>