0

How to run DOS/CMD/Command Prompt commands from VB.NET and want to hold its terminal output for few seconds. After that it should be close automatically.

Brian M Stafford
  • 8,483
  • 2
  • 16
  • 25
  • Vb.net and VB6 are different languages. Please remove the vb6 tag from your post! – John Eason Sep 28 '21 at 16:59
  • 1
    What have you already tried? How is it failing? You should start by looking at various process and console documentation in the MSDN docs. – Craig Sep 28 '21 at 17:30

1 Answers1

0

Depending on your goal, there could be multiple solutions to this request.

This SO post details how you can run a command from cmd.exe, passing arguments.

How to run DOS/CMD/Command Prompt commands from VB.NET?

Another idea, depending on the goal, would be to save the cmd as a batch file or similar, where you could have a pause or timed wait before the cmd window closes.

Then you could call the batch file from vb.net

I don't want to dive too deep into how each of these would be done without knowing more about the goal at hand.

J. Rockwood
  • 118
  • 7