V
V
venom_turbo_vtec2014-03-13 11:43:16
cmd/bat
venom_turbo_vtec, 2014-03-13 11:43:16

TASKKILL, MS VS2013, post-build events, how to properly kill a process?

Good afternoon.
I'm trying to add the following commands to the post-build event (MS Visual Studio 2013):

TASKKILL /F /IM "xxxx.exe" /T
copy /y $(TargetPath) c:\xxxx\

The following happens:
1) if the process is not running - TASKKILL returns code 128 and copying is performed
2) if the process is running - the process is killed, but TASKKILL returns code 1 (no access?) and copying is not performed.
Is it possible to somehow ignore code 1, or how to force code 0 to be returned?
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question