.

running shell commands from within c#

run shell commands:

 

 

private static void RunCommand(string cmdname)
        {
            System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.StartInfo.FileName = cmdname;
            p.Start();
        }

 

call it with the following command:

            RunCommand(“cmd”);  // opens a shell command prompt window

What's your thoughts on this?

*

Protected by WP Anti Spam