且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在WPF窗口中启动外部.exe应用程序

更新时间:2023-01-26 11:59:53

string strReportPath = System.IO.Directory.GetCurrentDirectory();

string strReportPath = System.IO.Directory.GetCurrentDirectory();

        if (strReportPath.Substring(strReportPath.Length - 9) == "bin\\Debug")
        {
            strReportPath = strReportPath.Substring(0, strReportPath.Length - 10);
        }

        Process p = new Process();
        p.StartInfo = new ProcessStartInfo(strReportPath + @"\bin\Debug\drag.exe");
        p.Start();

//拖动为您的sln名称;

//drag is your sln name;