0

I am writing a utility for Minecraft Coder pack. It works off batch files that run python. Is it possible to read and write from the cmd into say a text box and run commands for vb.net to the cmd?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Kuzon
  • 782
  • 5
  • 20
  • 49

1 Answers1

4

Yes. See my answer here: Opening a plink window from VB.NET application without showing the black ugly plink window

Basically, you want to hide the window, and redirect standard in/out.

Dim p as New Process
With p.StartInfo
    .WindowStyle=ProcessWindowStyle.Hidden
    .RedirectStandardOutput=true
    .RedirectStandardInput=true
End With

You can then read and write using p.StandardInput and p.StandardOutput.

You can find more options to set as well in the ProcessStartInfo class.

Community
  • 1
  • 1
Brad
  • 159,648
  • 54
  • 349
  • 530