@echo off
cls                                                                                       
echo.                                              
echo  _____________________________________________________________________                                               
echo  NETRO - GENESIS
echo  Function 2019 
echo  _____________________________________________________________________
echo  For running the demo it is highly recommended to use a
echo  http server (nodejs or anything else) and Chrome.
echo  The package includes a portable edition of http server 
echo  which can be used on Windows .
echo.
echo.
echo  1) Kill Chrome and start demo
echo     - The (Chrome) browser will be closed automatically. 
echo       Save before closing, blabla...
echo  _____________________________________________________________________
echo  2) Just start
echo     - New (Chrome) incognito window will be opened
echo  _____________________________________________________________________
echo.                            
echo. 
@ECHO OFF

CHOICE /C 12 /N /M "1 or 2?"
IF %ERRORLEVEL% == 1 GOTO FULLSTART
IF %ERRORLEVEL% == 2 GOTO START
EXIT
:FULLSTART
start wmic process where "name='node-windows.exe'" delete
start wmic process where "name='chrome.exe'" delete
TIMEOUT  1
cd server
start /MIN node-windows.exe server.js
cd ..
EXIT
goto: EOF
:START 
start wmic process where "name='node-windows.exe'" delete
TIMEOUT  1
cd server
start /MIN node-windows.exe server.js
cd ..
TIMEOUT 2 1>NUL

