@echo off
setlocal
title AjaxUploader Demos
echo.
echo  ============================================================
echo    AjaxUploader demos - starting up
echo  ============================================================
echo.
set "IISEXPRESS=%ProgramFiles%\IIS Express\iisexpress.exe"
if not exist "%IISEXPRESS%" set "IISEXPRESS=%ProgramFiles(x86)%\IIS Express\iisexpress.exe"
if not exist "%IISEXPRESS%" goto :noiis
echo  Serving DemoApp at http://localhost:8080
echo  Press Ctrl+C in this window to stop.
echo.
start "" /min cmd /c "timeout /t 4 >nul & start "" http://localhost:8080/"
"%IISEXPRESS%" /path:"%~dp0DemoApp" /port:8080
goto :done

:noiis
echo  [X] IIS Express was not found.
echo      Install it free from:
echo        https://www.microsoft.com/download/details.aspx?id=48264
echo      ...or open DemoApp in Visual Studio and press F5 instead.
echo.
pause
exit /b 1

:done
endlocal
