UIRobot: Unable to KILL Process

Scenario: UiRobot is throwing below error for KILL activity when run on a server. Service account we are using is having Admin access.

System.AggregateException: Encountered errors while trying to kill a process —> System.ComponentModel.Win32Exception: Access is denied at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)

Steps to reproduce:

Current Behavior:

Expected Behavior:

Studio/Robot/Orchestrator Version:

Last stable behavior:
Last stable version:
OS Version:
Others if Relevant: (workflow, logs, .net version, service pack, etc):

@aksh1yadav please help…

Try this using run command
Taskkill /IM firefox.exe /F

1 Like

Hey @Harnit.singh

Will you tell me which process you are targeting and what approach you are taking?

Regards,!!
Aksh

@aksh1yadav i am trying to Kill “EXCEL” Process by simply using “Kill Process” activity with Process name as “EXCEL”

send hot key =win+r
typeinto =Taskkill /IM excel.exe /F + enter

It is on server? Right? So that process might be start from some other user session so it is running in the background. if you are having already an admin access as you have mentioned that either try to kill that process forcefully or i have shared many months back one example on the forum to kill excle process user specific too… check that sample and try that…

Regards…!!
Aksh

Thanks @Atrimal and @aksh1yadav

For everyone’s reference, here is the link to example he is referring to: How to kill the excel process which is running by current user - #4 by aksh1yadav

I’m developing in the server and sharing that Windows instance with a few people. It works for me, apart from a system.aggregate exception which I deal with using try catch.

2 Likes

Do we need to have admin rights to run Kill Process activity on a remote machine.
Can someone answer. Thanks in advance…

@suman

While working on server, there can be many users working simultaneously

It is okay not to have admin previlleged For Killing any process on server if thats process is running under your user. You can do anything with your own process.

But if you want to kill a process which is currently running for other user for that you need admin rights

Hope this is helpful

2 Likes

Hello,

So i am using a kill process activity and it works fine on studio but it throws an exception when i run it from orchestrator in the same environment.

DO you have an idea why this is happening

1 Like

Hi @Odunayo_Ogundepo please post if you find any solution for orchsestrator issue

Hey @Odunayo_Ogundepo

It might be the user account you are using is not having sufficient rights :slight_smile: and that process has been initiated by other user account or admin.

So you can use my old post where i have mentioned how to kill a process for current user.

1 Like