May I know what exactly you are killing for each loop.
sometimes while fetching the processes list an application contains multiple instances.
when you kill process it will kill all instances, sometimes we will get error when you trying to kill which is already killed previously.
Ex: I have 2 instance of chrome and we are killing all the process in a loop , at first we killed chrome and in the next loop the chrome is not exists and we try to kill it again which encounters error.
Trying to kill a process will get a error because of many reasons.
but most of time, whether the kill activity is success or failure, the target process is already killed.
So, just need to set ContinueOnError to True that can avoid an exception be thrown.
Or also you can try to catch that exception and just make some memo in your log without throwing.
Hi @Chand You’ve mentioned that “In kill process activity I pass process.ProcessName as ProcessName”. Correct me if I am wrong, may I know why you are passing process.ProcessName, where should only pass process name.
for each is iterating over process name to kill list while is killing the particular process so often till no one longer is existing
We did in this way as we learned that process / childprocess structures confused iteration over process lists. Does mean: A process kill can also kill multiple processes when it come from childprocess relationships. But with this logic we didnt longer mind (Strategy - Kill to end)