Fellah Fellah - 1 year ago 109
Vb.net Question

How to run a Command Prompt command with Visual Basic code?

I'm trying to code something in Visual Basic, more specifically Visual Studio 2010. I want, with a button click, my program to execute a command. Is that possible?

Answer Source

Yes. You can use Process.Start to launch an executable, including a console application.

If you need to read the output from the application, you may need to read from it's StandardOutput stream in order to get anything printed from the application you launch.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download