try these:
========1==========
@ECHO OFF
SC \\192.168.2.163 start "Innovatrics Node 64-bit"
:WAITSERVICE1
ping -n 60 127.0.0.1 > nul
sc \\192.168.2.163 query "Innovatrics Node 64-bit" | FIND "STATE" | FIND "RUNNING"
IF ERRORLEVEL 1 GOTO WAITSERVICE1
SC \\192.168.2.164 start "Innovatrics Dispatcher"
:WAITSERVICE2
ping -n 60 127.0.0.1 > nul
sc \\192.168.2.164 query "Innovatrics Dispatcher" | FIND "STATE" | FIND "RUNNING"
IF ERRORLEVEL 1 GOTO WAITSERVICE2
SC \\192.168.2.165 start "FaceTisMatcher"
:WAITSERVICE3
ping -n 60 127.0.0.1 > nul
sc \\192.168.2.165 query "FaceTisMatcher" | FIND "STATE" | FIND "RUNNING"
IF ERRORLEVEL 1 GOTO WAITSERVICE3
========2===========
@ECHO OFF
:CHECK
CLS
ECHO Service: Status:
sc \\192.168.2.163 query "Innovatrics Node 64-bit" | FIND "STATE" | FIND "RUNNING" > NUL
IF ERRORLEVEL 1 ECHO Innovatrics Node 64-bit STOPPED
sc \\192.168.2.163 query "Innovatrics Node 64-bit" | FIND "STATE" | FIND "RUNNING" > NUL
IF ERRORLEVEL 0 ECHO Innovatrics Node 64-bit started
sc \\192.168.2.164 query "Innovatrics Dispatcher" | FIND "STATE" | FIND "RUNNING" > NUL
IF ERRORLEVEL 1 ECHO Innovatrics Dispatcher STOPPED
sc \\192.168.2.164 query "Innovatrics Dispatcher" | FIND "STATE" | FIND "RUNNING" > NUL
IF ERRORLEVEL 0 ECHO Innovatrics Dispatcher started
sc \\192.168.2.165 query "FaceTisMatcher" | FIND "STATE" | FIND "RUNNING" > NUL
IF ERRORLEVEL 1 ECHO FaceTisMatcher STOPPED
sc \\192.168.2.165 query "FaceTisMatcher" | FIND "STATE" | FIND "RUNNING" > NUL
IF ERRORLEVEL 0 ECHO FaceTisMatcher started
ping -n 5 127.0.0.1 > nul
GOTO CHECK
====================
script 1 will start service, then wait 1 minute, check if it is started, wait another minute ... until service is started
please note: if service can't be started, the script will wait forever...
script 2 will check every 5 seconds and display status
Please let me note if it works.. I didn't test them :-)
- Nic