Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the command "Timeout" in a batch file suddenly not work anymore?

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?

like image 878
Koenich Avatar asked Jun 11 '17 05:06

Koenich


1 Answers

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.

like image 199
Magoo Avatar answered Oct 02 '22 16:10

Magoo