Kill processes from server ONLY for current user

KillAppProcesses.xaml is killing processes completely from the server. Instead it should kill process only for current user.

is there any way to kill any process owned by current user only??

i had the same issue and ended up using a .bat file containing following command

taskkill /F /T /FI “USERNAME eq %USERNAME%” /IM “yourprocess”

you can invoke this file using ‘Start Process’ activity and passing the path to the file.

Please bear in mind that this is asynchronous, therefore it will not wait for completion of the bat file to continue execution of your UiPath process

Please try Below :


Current_user Value :

Poweshell Script


1 Like

Please try this activity will serve the purpose:

Hi Lalit,
I can see this activity supports only widows server 2016. I think it won’t support 2012 R2

Hi Sourabh,
Ideally it should work but we did not test it for Server 2011 R2 so you can try and revert with any error or exception it is throwing and we try to add those dependencies in it.