How to Retry KillAllProcesses

I would like to keep a KillAllProcesses sub process (very simple similar to the one used in REFramework) inside a retry (This is based on a design), but I can’t find a way to execute it or how to transform it correctly with UiPath activities. I am aware that UiPath has the “Retry Scope” activity but I cannot understand the part of its condition in the context of doing retry by killing all processes.
I would like to get recommendations or based on your experience, if you have built an action similar to this, or what would be the correct way to do it?

If you have an examples of a similar scenario would be very helpful to understand it, thank you very much.

Why do you want to Retry it?

Also, there is something about Kill Process that seems to be widely misunderstood, and should be corrected by UiPath.

It attempts to kill all the matching processes regardless of which user they’re running under - so if you do not have local administrator rights the Kill Process fails because you can’t kill a process for another user; even worse - if you do have administrator rights then it will kill the process for other users.

Imagine you have another automation running under a different user and it’s using Excel, if you “Kill Process” Excel it’ll kill it for the other automation too.

It’s much better to use Close Application than Kill Process.

1 Like

have a look here as well

A pattern on kill processes handling the variying no. of subprocesses

Killing process for current user:

1 Like

Hi @JavXult

We can use power shell command for killing the application for the particular user we want by using invoke powershell activity,

Powershell command to kill application for particular user,

Change username to the one you are logged in,
Change myprog to the application you want to kill,

TASKKILL.EXE /FI “USERNAME eq username” /IM myprog.exe


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.