TheFox
23-01-2011, 02:47
Есть очень полезная программка, которую я использую в батнике, называется WAITER.exe. Она делает паузу в батнике, отсчитывает указанное количество секунд и завершается, выполнение батника продолжается. Причем тип завершение влияет на errorlevel. Если дождаться завершения отсчета или нажать ctrl+a, errorlevel 0, если нажать любую другую клавишу, то errorlevel 1. Возможно ли каким-то образом влезть в тело exe'шника и поменять так, чтобы errorlevel был 0 при завершении отсчета и при нажатии любой клавиши, а нажатие ctrl+a давало errorlevel 1?
Вот выдержка из описания, идущего с прогой:
DESCRIPTION
Waiter counts down for a default of five seconds, then terminates with ERRORLEVEL 0. If the user presses a key during countdown, waiter terminates with ERRORLEVEL 1.
A hidden feature allows the user to terminate with ERRORLEVEL 0 by pressing ctrl-A. This allows the impatient user to override the wait, but take the default action.
PARAMETERS
waiter [-q -s seconds] msgline1 msgline2....
заранее благодарен.
Вот выдержка из описания, идущего с прогой:
DESCRIPTION
Waiter counts down for a default of five seconds, then terminates with ERRORLEVEL 0. If the user presses a key during countdown, waiter terminates with ERRORLEVEL 1.
A hidden feature allows the user to terminate with ERRORLEVEL 0 by pressing ctrl-A. This allows the impatient user to override the wait, but take the default action.
PARAMETERS
waiter [-q -s seconds] msgline1 msgline2....
заранее благодарен.