summaryrefslogtreecommitdiff
path: root/eng/kill_tasks.cmd
blob: ee7099c94dbc51a5d2e3bc23ed10435f5ef616b3 (plain)
1
2
3
4
5
6
7
8
9
10
@if not defined _echo @echo off
setlocal EnableDelayedExpansion

:: Check if VBCSCompiler.exe is running
tasklist /fi "imagename eq VBCSCompiler.exe" |find ":" > nul
:: Compiler is running if errorlevel == 1
if errorlevel 1 (
	echo Stop VBCSCompiler.exe execution.
	for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F
)