storm2005
30-03-2007, 18:16
Надо отследить запущен ли процесс и если отсутствует запустить программу.
SET SEARCH=qip.exe
tasklist /fi "imagename eq %SEARCH%" /fo table /nh > %TEMP%\tmp.tmp
find /c "%SEARCH%" %TEMP%\tmp.tmp
if ERRORLEVEL 1 start notepad.exe
почему блокнот стартует если код возврата 0?
SET SEARCH=qip.exe
tasklist /fi "imagename eq %SEARCH%" /fo table /nh > %TEMP%\tmp.tmp
find /c "%SEARCH%" %TEMP%\tmp.tmp
if ERRORLEVEL 1 start notepad.exe
почему блокнот стартует если код возврата 0?