1

I'm doing a loop to check the battery status of a windows tablet. Therefore I wait 20 seconds to controll the battery status.

when I call

TIMEOUT /T 20 /NOBREAK

it works on 20 tablets perfecly. on one tablet I'm getting sometimes the callback "Waiting 12328783 seconds, press..." the seconds value is a huge value...

why this tablet callback a total wrong waitng time?

bluelemonade
  • 1,115
  • 1
  • 14
  • 26
  • 1
    possibly [related](http://stackoverflow.com/questions/37619274/batch-file-timeout-command-jumping-to-10k-30k-40k-seconds?rq=1) - maybe `choice` solves your problem. – Stephan Feb 09 '17 at 15:00

1 Answers1

1

Best guess is that the machine is using something other than timeout.exe, probably a batch file with the name timeout.bat or timeout.cmd.

To fix this change the command to read:

TIMEOUT.EXE /T 20 /NOBREAK

Or:

"%__APPDIR__%TIMEOUT.EXE" /T 20 /NOBREAK
Compo
  • 36,585
  • 5
  • 27
  • 39
  • this happens not every time, In 4 of 5 cases it works fine. – bluelemonade Feb 09 '17 at 10:54
  • If using the options I have provided does not fix the issue you reported then the issue becomes a computer one, not a script/coding one, and is out of the scope of this site. – Compo Feb 09 '17 at 11:03