[英]Batch file called from a c# application not getting executed via task scheduler
I have a C# application which internally creates a batch file and runs it. 我有一个C#应用程序,它在内部创建一个批处理文件并运行它。 When I run the exe manually, everything works fine, but when i run it via task scheduler, it fails to execute the batch file. 当我手动运行exe时,一切正常,但是当我通过任务调度程序运行它时,它无法执行批处理文件。 (I'm using Windows 8). (我正在使用Windows 8)。 Can anyone please help me? 谁能帮帮我吗? Thanks in advance 提前致谢
I guess the running directory is not correct. 我猜运行目录不正确。 Your application creates the batch file on the wrong place or your application looks for the batch file on the wrong place. 您的应用程序在错误的位置创建批处理文件,或者您的应用程序在错误的位置查找批处理文件。 Check the running directory in the task scheduler to fix this. 检查任务计划程序中的运行目录以解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.