0
我試圖通過C#代碼將.exe傳遞給另一個。使用另一個可執行文件的命令行參數啓動進程
這裏是我到目前爲止的代碼:
string ex1 = System.Windows.Forms.Application.StartupPath.ToString() + "\\dev\\psm.exe";
string ex2 = System.Windows.Forms.Application.StartupPath.ToString() + "\\dev\\Application\\app.exe";
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.FileName = ex1;
startInfo.WindowStyle = ProcessWindowStyle.Normal;
startInfo.Arguments = ex2;
try
{
Process.Start(startInfo);
}
catch
{
}
哪個參數就可以用作一個文件拖到應用程序?
詳細信息:
當您正常運行psm.exe時,它會提示輸入文件名和目錄。
然而,當你拖上psm.exe批准的應用程序,
它自動加載應用程序。
這怎麼用C#來完成?
這將啓動psm.exe並將參數傳遞給app.exe – Geoff
沒有工作。只打開第一個.exe然後終止。 – GTAWWEKID
我更新了我的問題,瞭解更多詳情。 – GTAWWEKID