willard
willard

Reputation: 21

Running a command with Visual Basic

I have seen another question like this one, but I can't get it to work. I would like my visual basic program to run the command prompt, and run the command ipconfig. Right now, I am trying Process.Start("C:\WINDOWS\system32\cmd", "ipconfig"), but it only opens the command prompt and doesn't run ipconfig. Any help is appreciated.

Upvotes: 1

Views: 1806

Answers (1)

Nanoturka
Nanoturka

Reputation: 421

Process.Start("cmd", "/k ipconfig")

you can try this

Upvotes: 2

Related Questions