1 @if not defined _echo @echo off
2 setlocal EnableDelayedExpansion
4 :: Check if VBCSCompiler.exe is running
5 tasklist /fi "imagename eq VBCSCompiler.exe" |find ":" > nul
6 :: Compiler is running if errorlevel == 1
8 echo Stop VBCSCompiler.exe execution.
9 for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F