views:

110

answers:

1

Hi, I need to kill a windows process (java.exe). I'm currently using:

taskkill.exe /F /IM java.exe

I need to use the /F option since is a critical process,but in this way I get a return code 1 instead I need a return code 0 (returned when I don't use /F for killing other not critical processes)

how could I fix this problem?

Many thanks

+1  A: 

You can try with :

TASKKILL /F /IM "notepad.exe"

You can know more here. Visit this blog too.

venJava