KillProcess closing application in all the user

Hi,

We are using killProcess activity to kill the application which is opened but it’s closing for all users A, B, C instead of one user A. We have used “Applies to” is “OnlyCurrentUser” in property.

The Process was working fine in legacy orchestrator. We are facing this issue after we moved to cloud orchestrator.

Please suggest some ideas.

Thanks,
Sandhiya

@sandhiyakp15,

Try updating the UiPath.System.Activities package to latest version. If already on latest try downgrading by one version.

If still issue persists, you can use this workaround till you find a solution.

We are using same version for other process as well but this process alone creating issue. Even we checked in different machine the same process but still we are getting same issue.

Hi @sandhiyakp15

Is the Robot user has admin user role in the server?

If so, Change the user from “Administrators” group to “Users” group or any other appropriate group that has the necessary permissions but not admin-level permissions.

I can think of this reason just check.

Hope this helps :slight_smile:

Hi,

Can you please check below screenshot,

This is what we have, anything needs to be changed.

Not in orchestrator on the server level. If user is in admin group or power user this issue can come.

Check on the server user is in which group.

UiPath cloud Admin server right?

Do I need to check here?

Your RDP server where you run your bot.
How to check if User Account has Admin rights in Windows 11/10

Thanks. We tried running different process in the same machine, it’s running fine. So, I think it’s not the machine issue. Is there any options?

With the same user you ran the other process?

Hi @sandhiyakp15,

How did you find out that process is killing an application for all those users on that machine?

Are all those users logged into the machine at the same time and running their processes?
Or have the application opened manually?

Regards
Sonali

Hi,

Yes, all users are running at the same time. We have checked by seeing the logs. Even we tried running users at different time but once chrome opened in another user, it’s closed in already running user.

Hi, Yes we ran the other process in the same user

@sandhiyakp15

try this settings:
Continue On Error: True
Applies To: KillProcessApplyOn.OnlyCurrentUser

Hi @sandhiyakp15,

Could you please enable below logic around your kill process.

  1. Get the current user name by Environment.UserName .
  2. Add check in the if-condition that processName=“YourProcessName” AND UserName= Environment.UserName, only then kill process.

This way it can be ensured that process is killed for only logged in user.

You can also use log activity here to print processName and UserName, this will help you in troubleshooting as well as to why the kill is happening for every user.

Hope this helps.

Regards
Sonali

Hi @sandhiyakp15 , would you able to tell us which application?

Does the application run in userland or is there an underlying service that is run as a common user? You can check the Windows task manager to find out the username that is running the application.

If you manually kill the application from task manager, does it behave as expected?

Hi,

What we observed recently is, it’s working fine in attended mode but while running in unattended mode, chrome is getting closed automatically.

It seems like not happening of “KillProcess” activity, something with chrome but not sure.

Kindly suggest on this.

Thanks,
Sandhiya P

@sandhiyakp15 , why do you need to “kill” Chrome?

I’m guessing you use the “Use Application/Browser” to initiate a Chrome session? If that’s the case go to the properties and select “If Opened by Application/Browser” under the “Close” property.

Hi @sandhiyakp15,

It may be worthwhile to debug the code to see the control flow. You would be able to understand at exactly which point it is failing. If you are using re-framework, there is a good chance that initialisation state is throwing system exception leading the control to go to end process where it will go to close applications so even if chrome was opened but some system exception came right afterwards it will get closed automatically.

Regards
Sonali