ShellExecuteEx

  • Thread starter Thread starter DaveP
  • Start date Start date
may be you want this.

Process myProcess = new Process();
myProcess.StartInfo.FileName = "cmd.exe";
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProcess.StartInfo.Arguments = "/c" + " dir >> c:\test.txt";
myProcess.Start();

this will execute the dir command in console [ like in console: C:\>
dir/w >> test.txt ]

Salman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top