现在本人希望使用C#通过点击按钮,运行两个批处理文件,该批处理文件可以在各自的目录里正常运行,但C#调用时出现如下图结果,本人使用的调用方法是论坛里介绍的System.Diagnostics.Process.Start(“C:\a.bat”);


均显示未找到文件,不知造成这种情况的具体原因,请教解决方法。


均显示未找到文件,不知造成这种情况的具体原因,请教解决方法。
解决方案
35
这不是代码问题,是你的bat写的有问题,没有指定好目录
5
你把Environment.CurrentDirectory设置成批处理文件目录试试