Aloha,
I was using MS Visual studio net for the first time yesterday and made a simple calculator program in c#.
Now to my question: How can I run a dos command from C#? For example if I would to make a button that runs the command "ipconfig /all" or something like that.
Loading
csharphelpPosted Oct 26, 2005, 6:41 AM
try this
using System.Diagnostics;
Process p=new Process();
p.StartInfo.FileName="cmd.exe";
p.StartInfo.CreateNoWindow=true;
p.StartInfo.UseShellExecute=false;
p.StartInfo.Arguments="\k dir";//where dir can be any dos command
p.Start();
Ricardo SchroederPosted Oct 14, 2005, 10:51 AM