开发者

Is it possible to retrieve (programatically) the exit code of a Windows task?

开发者 https://www.devze.com 2023-01-12 19:36 出处:网络
I am running a task from inside a batch file like this: schtasks /run /tn TASK_NAME The task, in turn, executes another batch file, that may exit with an error code thus:

I am running a task from inside a batch file like this:

schtasks /run /tn TASK_NAME

The task, in turn, executes another batch file, that may exit with an error code thus:

exit -1

Is there any way to get the e开发者_开发知识库xit code of the task that completed?


I think ERRORLEVEL might be what you're looking for: http://www.robvanderwoude.com/errorlevel.php

0

精彩评论

暂无评论...
验证码 换一张
取 消