0

Immediate Server Startup Please

I don't like the server running in the background when I am not using the app but the app startup when the server is not running is painfully slow as it waits for a timeout. It would be better if the app immediately checked for the running server and then auto-started the server if required.

1 comment

  • 0
    Avatar
    David S.

    You can use a batch file to do that. Save the following commands to a file called "start_playon.bat" (make sure it's not named "start_playon.bat.txt") and then edit the PlayOn shortcut to point to it instead of playon.exe.

    @ECHO OFF
    for /F "tokens=3 delims=: " %%H in ('sc query "MediaMall Server" ^| findstr " STATE"') do (
    if /I "%%H" NEQ "RUNNING" (
    echo Starting MediaMall Server.
    sc start "MediaMall Server"
    echo.
    echo Waiting 5 seconds to start PlayOn.
    timeout /t 5 /nobreak
    )
    )
    start "" "%ProgramFiles(x86)%\MediaMall\PlayOn.exe"

Please sign in to leave a comment.