c#调用命令行控制程序

来源:互联网 发布:ubuntu python3 idle 编辑:程序博客网 时间:2024/05/17 09:29

 System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
            startInfo.CreateNoWindow = false;
            startInfo.UseShellExecute = false;
            startInfo.RedirectStandardInput = true;
            startInfo.RedirectStandardOutput = true;
            startInfo.RedirectStandardError = true;
            startInfo.FileName = "D://Program Files//E.M. Magic Swf2Avi//mswf2avi.exe";
            startInfo.WindowStyle = ProcessWindowStyle.Hidden;
            startInfo.Arguments = "mswf2avi /f F://TDDOWNLOAD//111.swf /o F://TDDOWNLOAD//out11.mpg /pi ini/ntscdvd.ini /pn mpg Normal ";
            try
            {
                using (Process exeProcess = Process.Start(startInfo))
                {
                    exeProcess.WaitForExit();
                }
            }
            catch
            {
               
            }
           

原创粉丝点击