The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Batch
By Guest on 19th March 2017 03:30:58 AM | Syntax: WINBATCH | Views: 85



New paste | Download | Show/Hide line no. | Copy text to clipboard
  1. ::      -bw_server_monitor.bat 
  2.                 @echo off
  3.                 title bw_server_monitor.bat
  4.                 :start
  5.                 C:\Windows\System32\tasklist /FI "IMAGENAME eq BlackwakeServer.exe" 2>NUL | C:\Windows\System32\find /I /N "BlackwakeServer.exe">NUL
  6.                 if "%ERRORLEVEL%"=="0" goto loop
  7.                 echo Server is not running, will be started now
  8.                 start "" /min /wait "C:\_blackwake\bw_server_start.bat"
  9.                 timeout 30
  10.                 echo Server started succesfully
  11.                 goto started
  12.                 :loop
  13.                 cls
  14.                 echo Server is already running, running monitoring loop
  15.                 C:\Windows\System32\timeout /t 80
  16.                 C:\Windows\System32\tasklist /FI "IMAGENAME eq BlackwakeServer.exe" 2>NUL | C:\Windows\System32\find /I /N "BlackwakeServer.exe">NUL
  17.                 if "%ERRORLEVEL%"=="0" goto loop
  18.                 goto start



  • Recent Pastes
  • Gfdg
    2 days 16 hours 32 mins 46 secs ago
  • LOL
    1 week 13 hours 30 mins and 45 secs ago
  • Wert
    1 week 1 day 8 hours 26 mins and 5 secs ago
  • 354643643
    1 week 6 days 2 hours 20 mins and 47 secs ago
  • Qwerty
    2 weeks 1 hour 50 mins and 54 secs ago