如何在c#.net windows应用程序中为run two exe命令行参数? [英] How do I command line arguments for run two exe in c# .net windows application?
本文介绍了如何在c#.net windows应用程序中为run two exe命令行参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
如何在c#.net windows应用程序中运行两个exe或可执行文件的命令行参数?
请帮帮我。
先谢谢。
Ankit Agarwal
软件工程师
Hello,
How do I command line arguments for run two exe or executable file in c# .net windows application?
Please help me.
Thanks in Advance.
Ankit Agarwal
Software Engineer
推荐答案
尝试:
Try:
Process p1 = new Process();
p1.StartInfo.FileName = @"D:\Temp\MyFirstExe";
p1.StartInfo.Arguments = "MyFileName.txt -o myOutputFile.txt";
p1.Start();
Process p2 = new Process();
p2.StartInfo.FileName = @"D:\Temp\MySecondExe";
p2.StartInfo.Arguments = "\"Another set of arguments\" \"to pass through\"";
p2.Start();
使用密码创建一个参数,因此您是唯一可以运行第二个exe的人。
MySecondExe -p password -o options
Create an argument with a password, so you are the only one who can run the second exe.
MySecondExe -p password -o options
这篇关于如何在c#.net windows应用程序中为run two exe命令行参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文