@echo off


set p1=monitor.exe
for /f %%i in ('tasklist') do (
	if %%i==%p1% (
		echo monitor is already running...
		call:foundMonitor
	)
)
echo monitor is not running...

:foundMonitor
set q=RaySync-Proxy-Server.exe
for /f %%i in ('tasklist') do (
	if %%i==%q% echo RaySync-Proxy-Server is already running...
)

set p=RaySyncServer.exe
for /f %%i in ('tasklist') do (
	if %%i==%p% (
        echo RaySyncServer is already running...
        call:foundR5
    )
)
echo RaySyncServer is not running...

:foundR5
set p5=RayFileServer.exe
for /f %%i in ('tasklist') do (
    if %%i==%p5% echo RayFileServer is already running... & pause & exit
)
echo RayFileServer is not running...

pause
exit
