预定 运行 批未将输出记录到文件

Scheduled Run of batch not logging output to file

我有两个批处理文件,一个调用另一个

1)test1.bat 具有内容 ping 127.0.0.1

2) test.bat 具有内容 call "D:\test1.bat" >>output1.txt 2>>&1

当我双击 test.bat 时,正如预期的那样,输出记录到 output1.txt。然而,当我安排相同的 test.bat 文件时,没有任何记录。

我正在使用正常的 Windows 任务计划程序来安排它。我在这里错过了什么?

windows 任务调度程序的工作目录在哪里?我想你会在那里找到你的 output1.txt;或者尝试 call "D:\test1.bat" >> D:\output1.txt 2>>&1