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