running shell commands from within c#

by pietman 2. March 2010 13:45

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

Tags:

c#

Add c0mment




  Country flag
biuquote
  • Comment
  • Preview
Loading


About ...

pietman celliersPietman Celliers
Bitlink  Ltd
bitlinkit.com