how to open command prompt and execute line from cmd RRS feed

  • Question

  • i able to open a cmd, but how to execute the command and exit the cmd?


        private void Form1_Load(object sender, EventArgs e)
          var processStartInfo = new ProcessStartInfo
            FileName = "cmd"
          Process process = Process.Start(processStartInfo);

    lets say i wan to execute the command "cd\" exit the cmd

    Thursday, July 7, 2011 6:44 AM