demos
demos

Reputation: 2630

Running shell commands in ASP.NET

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 maintenance commands.

Upvotes: 4

Views: 11343

Answers (2)

abatishchev
abatishchev

Reputation: 100258

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

Upvotes: 7

Oded
Oded

Reputation: 499002

Use Process.Start:

Process.Start("netstat", "-an");

Upvotes: 3

Related Questions