我将尝试运行以下命令:
"G:\Arml\Automation\Aystem\Programs\BCompare.exe @G:\Arml\Automation\System\bcomp_script.txt c:\text1.txtc:\text2.txt c:\a.xml";
在c#中,它没有执行结果
我需要什么正确的密码?
发布于 2015-11-18 07:12:09
在C#中,您应该运行另一个进程来运行cmd.exe。如果您在控制台中检查它,并且命令字符串没有任何错误,您可以这样做:
string commandText;
commandText= @"/c G:\Arml\Automation\Aystem\Programs\BCompare.exe G:\Arml\Automation\System\bcomp_script.txt c:\text1.txt c:\text2.txt c:\a.xml";
System.Diagnostics.Process.Start("CMD.exe",commandText);发布于 2015-11-18 07:23:36
此外,您还可以运行"BCompare.exe“程序而不运行"cmd.exe”。
string exename = @"G:\Arml\Automation\Aystem\Programs\BCompare.exe";
string args = @"@G:\Arml\Automation\System\bcomp_script.txt c:\text1.txt c:\text2.txt c:\a.xml";
System.Diagnostics.Process.Start(exename, args);https://stackoverflow.com/questions/33773801
复制相似问题