"vincent" <vi*****@discussions.microsoft.comwrote in message
news:18**********************************@microsof t.com...
How to execute a dos commend in C#?
Many thanks for your replying.
The easiest way is with PowerShell:
private void button1_Click(object sender, EventArgs e)
{
using (RunspaceInvoke ri = new RunspaceInvoke())
{
Collection<PSObjectresults =
ri.Invoke("the-command-you-want-to-execute");
}
}