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??

Hi,
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 :

image

Current_user Value :
image

Poweshell Script


Mukesh

1 Like

Hi,
Please try this activity will serve the purpose: https://connect.uipath.com/marketplace/components/kill-process-for-current-user

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.