开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜