문제

Problem is if this process doesn't exist, build fails. I try to write something like this

tasklist /nh /fi "imagename eq XDesProc.exe" | find /i "XDesProc.exe" && (
TASKKILL /F /IM "XDesProc.exe"
) || (
echo XAML designer is not running
)

But ERRORLEVEL is equal to 1 too and bild fails if XDesProc.exe is not running.

도움이 되었습니까?

해결책

You could use a conditional test on the PID to avoid this:

  taskkill /f /fi "pid gt 0" /im xdesproc.exe
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top