tags:

views:

19

answers:

2

How do i run a shell command in asp.net ?

I basically want something like system("netstat -an");

I don't want the output to be displayed to the user. Just want to run some maintainence commands ...

A: 

Use Process.Start:

Process.Start("netstat", "-an");
Oded
+5  A: 

call System.Diagnostics.Process.Start("netstat", "-an"); as usually

abatishchev
+1 Simple, and straight to the point :)
Stephen Murby