Run CMD command without displaying it?

前端 未结 4 1043
难免孤独
难免孤独 2021-02-20 09:59

I have created a Process to run command in CMD.

var process = Process.Start(\"CMD.exe\", \"/c apktool d app.apk\");
process.WaitForExit();

How

4条回答
  •  礼貌的吻别
    2021-02-20 10:37

    ProcessStartInfo startInfo = new ProcessStartInfo();
    startInfo.CreateNoWindow = true;
    startInfo.UseShellExecute = false;
    startInfo.FileName = "dcm2jpg.exe";
    startInfo.WindowStyle = ProcessWindowStyle.Hidden;
    startInfo.Arguments = "-f j -o \"" + ex1 + "\" -z 1.0 -s y " + ex2;
    

提交回复
热议问题