Launching a Process using Process.StartInfo

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to call a process from my c# application.
I want to execute certain number of arguments one after the other .

For e.g
In Diskpart.exe
I want to first execute "List Disk"
Then I want to execute "Select Disk x"

Is that possible to do programmatically(specially in c#)
I am aware of the concept called piping(writetopipe() in c++)
Is there anything similar in c# .NET

Help would be appreciated

Thanks.
 
MVB said:
Hi,

I am trying to call a process from my c# application.
I want to execute certain number of arguments one after the other .

For e.g
In Diskpart.exe
I want to first execute "List Disk"
Then I want to execute "Select Disk x"

Is that possible to do programmatically(specially in c#)

I would try using the Process.RedirectStandardInput property (along with
Process.StandardInput).
 
Back
Top