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

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.

3 Likes

Hi @Old_Musical_Hits,

I would suggest you to create a custom activity for this particular scenario following the link below:

1 Like

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

http://stackoverflow.com/questions/18765386/kill-process-by-process-id

1 Like

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

12 Likes

Thanks

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

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

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

1 Like