Start a command line including arguments from C#

后端 未结 3 1208
不知归路
不知归路 2021-01-15 11:33

I need to start a complete command line like \"app.exe /arg1:1 /arg2:true\" from my C# app.

Process.Start and ProcessStartInfo needs to have the filename and argumen

3条回答
  •  花落未央
    2021-01-15 12:04

    ProcessStartInfo.UseShellExecute makes Process.Start behave exactly like the Shell: http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.useshellexecute.aspx

提交回复
热议问题