简体   繁体   English

从ac#应用程序调用的批处理文件未通过任务调度程序执行

[英]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.

相关问题 从任务调度程序C#调用时,StreamWriter不写入文件 - StreamWriter not writing to file when called from task Scheduler C# 由于脚本任务,从任务计划程序通过批处理文件调用 SSIS 包失败 - SSIS Package fails when called from task scheduler via a batch file because of a script task 使用C#的任务计划程序(要计划.bat(batch)文件) - Task Scheduler using C# (To Schedule .bat(batch) file) 为什么从Windows Task Scheduler运行时C#Application无法创建文件? - Why C# Application does not create file while running from windows task scheduler? 您如何等待任务计划程序任务在批处理文件或 C# 中完成? - How do you wait on a Task Scheduler task to finish in a batch file or C#? 如何通过Win 2k3服务器上的任务计划程序将参数传递给C#控制台应用程序? - How to pass parameters to C# Console Application via task scheduler on win 2k3 server? C#中的任务计划程序 - Task Scheduler in c# 从隐藏窗口的c#执行批处理文件时,该批处理文件执行的程序将无法启动 - When executing a batch file from c# with the window hidden, programs that are executed by the batch file won't start 如何从服务器上的Windows Task Scheduler运行ac#控制台应用程序 - How to run a c# console application from windows task scheduler on server C#申请批处理文件 - C# Application to batch file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM