Hide Command Window in C# Application

前端 未结 4 1477
温柔的废话
温柔的废话 2020-12-10 03:50

Before you say its a duplicate question, please let me explain (as I\'ve read all similar threads).

My application has both of these settings:

  proc         


        
4条回答
  •  孤城傲影
    2020-12-10 03:55

    i see that you are calling cmd and then passing the command as parameters. Instead call the command directly

    e.g.

        System.Diagnostics.ProcessStartInfo procStartInfo = new System.DiagnosticsProcessStartInfo("xcopy", "  ");
    
    procStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    

提交回复
热议问题