@echo off
for /f %%i in ('wmic path win32_process where "caption='vision.exe'" get processid') do if %%i GTR 0 set "vpid=%%i"
for /f "tokens=2" %%i in ('wmic path win32_process where "caption='landnova.exe'" get Commandline') do set "CurrParams=%%i"
if not [%CurrParams%]==[] taskkill /im landnova.exe /f
if not [%vpid%]==[] goto :activate
start c:\vision\vision.exe
exit

:activate
echo activating vision
%~p0\appactivate.vbs %vpid%



