How to kill the excel process which is running by current user

process

#1

Hi, I wan to kill excel process which is running in back end for the user. When I use kill process, uipath kills all the user’s excel processes but I want to kill particular user’s excel process. Any login to solve this problem is greatly appreciated.


#2

Hi @Old_Musical_Hits,

I would suggest you to create a custom activity for this particular scenario following the link below:
https://www.codeproject.com/Tips/803226/How-to-kill-process-by-process-name-and-user-name


#3

You can retrieve the pid by using get attribute activity and then


#4

Hey @Old_Musical_Hits

Here I am attaching a reference workflow which is getting all process list then making the comparison between process owner username and current logged in user name and comparing them.

Please review the attached workflow and let me know :slight_smile:
processkillforuserWorkflow.xaml (9.4 KB)

Regards…!!
Aksh


#5

Thanks


#6

Thanks for your help…Does it kill all the excel process from another user too specially in VDI environment?


#7

Hi @db00465949,

If you are using the same machine with multiple user, while using kill process it will kill for all users.

If you want to close particular user use close application activity

Regards,
Arivu


#8

Hey @db00465949
IN VDI you can use powershell command :slight_smile: check below existing threads for more info.

It is possible to kill a process running on a remote computer with taskkill. Just run the following to kill notepad.exe on a remote computer called AkshSystem

taskkill /S AkshSystem /U RemoteAccountName /P RemoteAccountPassword /IM notepad.exe /F

Check out this existing thread - https://forum.uipath.com/t/print-all-processes/13919/11
A whole thread Discsussion :-print-all-processes

Regards…!!
Aksh