为什么命令"Timeout"超时在批处理文件中突然不工作了吗? [英] Why does the command "Timeout" in a batch file suddenly not work anymore?
问题描述
我是否错过了Windows内部超时"命令的更改?
我有一个很长的批处理文件,现在可以显示程序的版本号.我添加了超时命令,以使CMD窗口保持打开状态几秒钟.所以我的批处理文件现在看起来像这样:
context -version
timeout 7
这工作正常,但是由于某些Windows更新(显然),CMD窗口将直接关闭,就像超时命令不再起作用一样.当我从CMD窗口启动文件时,出现一条消息:
D:\ CTX> 超时7
尝试超时-帮助"以获取更多信息.
该文件是自创建以来的样子,但是这种行为对我来说是新的.
那么有人可以告诉我我在这里出什么问题吗?
我相信您可能已经获得了timeout
的其他版本,因为帮助提示--help
是\*nixy
样式的选项说明符.>
在提示下尝试
where /T timeout.*
应在path
上列出timeout
版本,并可能有助于查找恶意版本.
Did I miss a change of the Windows internal "timeout" command?
I have a batch file for a long time now that shows me the version number of a program. I added the timeout command to keep the CMD window opened for a few seconds. So my batch file now looks like this:
context -version
timeout 7
This worked fine but since some Windows update (obviously), the CMD windows closes directly as if the timeout command doesn't work anymore. When I start the file from a CMD window I get a message:
D:\CTX>timeout 7
Try 'timeout --help' for more information.
The file is as it was since I created it, but the behavior is new to me.
So can anybody tell me what I is going wrong here?
I believe you've probably acquired a different version of timeout
since the help prompt --help
is a \*nixy
style option-specifier.
Try, from the prompt
where /T timeout.*
which should list the timeout
versions on the path
and may assist in locating the rogue version.
这篇关于为什么命令"Timeout"超时在批处理文件中突然不工作了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!