Should be:
..Start(@"cmd.exe", "/C ""dir""");
or something similar (didn't test this exact code). Just running cmd.exe
dir (try it on the command line) doesn't work - cmd.exe /C "dir" DOES work,
so you have to pass the parameters like that.
--
C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard
"Mark Reed" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> I am trying to have a button that brings up the cmd prompt and then does
> a DIR listing.
>
> I am using:
>
> private void button2_Click(object sender, System.EventArgs e)
> {
> System.Diagnostics.Process.Start("cmd.exe","dir");
> }
>
> It does everything except the dir.
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!