@echo off
SETLOCAL ENABLEEXTENSIONS

set runmode=standalone

if "%~1"=="" goto standalone
if NOT "%~1"=="service" goto standalone
set runmode=service

:standalone

call setenv.bat %~1
call wowzaversion.bat

if not %WMSENVOK% == "true" goto end

set CLASSPATH="%WMSAPP_HOME%\bin\wms-bootstrap.jar"
set CLASSPATH=%CLASSPATH:\=/%
set CLASSPATH=%CLASSPATH://=/%

"%_EXECJAVA%" -Dcom.wowza.wms.runmode="%runmode%" -Dcom.wowza.wms.native.base="win" -Dcom.wowza.wms.ConfigURL="%WMSCONFIG_URL%" -cp %CLASSPATH% com.wowza.wms.bootstrap.Bootstrap outputTuningCommandLine

:end