rem Info zur Version:
rem Datum        Wer     Info
rem 24.03.2010   J.Fes   ueberarbeitet

if #%2#==## (
 Echo Err: [Call %0]& Echo Err: missing paramters
 Echo Inf: P1=Prog_N P2=Prog_DPNE
 Echo Example: PlmJobManagerWatchDog starten
 Echo call "ProgStart_If_NotRuning.cmd" "PlmJobManagerWatchDog" "C:\Programme\PlmJobManagerWatchDog\PlmJobManagerWatchDog.exe"
 goto :eof
 )
setlocal
 rem -- Rootpfade setzen
 set ExeToRun_N=%1
 set ExeToRun_N=%ExeToRun_N:"=%
 set ExeToRun_DPNE=%2
 set ExeToRun_DPNE=%ExeToRun_DPNE:"=%
 tasklist /FI "IMAGENAME eq %ExeToRun_N%*" 2>nul | findstr /i /c:"%ExeToRun_N%">nul
 set ExeToRun_isNotRuuning=%errorlevel%
 if "%ExeToRun_isNotRuuning%" neq "0" Echo "Prog:[%ExeToRun_N%]: Start now"& start "%ExeToRun_NE%" "%ExeToRun_DPNE%" %3 %4 %5 %6 %7 %8 %9
 if "%ExeToRun_isNotRuuning%" equ "0" Echo "Prog:[%ExeToRun_N%]: OK is allrady running"
endlocal
goto :eof
