Kill a specific process for a Program/Application

Hi Community.

I have built automation to refresh PowerBI dashboards on PowerBI Desktop application and have observed that for certain dashboards it randomly throws an error.

When I built control to close that error pop-up, the flow does not proceed further. However, I observed that another inactive window of “PowerBI Desktop” is present in the taskbar which ideally should not be there now. When I manually close this pop-up, the process continues as defined else not.

So as a solution to my issue I went through several discussions and came to know about “Kill Process” activity. However, my issue is that I do not want to kill the entire PowerBI process rather just kill this one instance which appears in Task Manager without any name so the process can continue to next queries and files.

Any help in this regards will be highly appreciated.

Thank You.

hi @gujralsaurabh,

Please have a look at below thread. The thread explains how to kill a Process for specefic user. Here Before killing we are checking the current user. You can leverage the same for your case .


Mukesh

Hi @mukeshkala. Thanks for sharing this but I already went through this thread and could not relate it to my issue.

My problem is not user specific, but targeting one specific process for a program (PowerBI) running for the same user.

@mukeshkala Consider it like this.

I have multiple windows of PowerBI open and I wish to close a specific one from them. How do I identify that?

@gujralsaurabh,

In Task Manger - Is there a way to differentiate between the instances.

Yes. the one i need to close does not have a name.

Hi @gujralsaurabh,

In addition to @mukeshkala recommendation, the second recommendation is to close the PowerBI window when you close the error pop-up. Attach Window activity for PowerBI which has an output variable of type Window which you can provide as Input to Close Window activity.


Both recommendations are complementary especially when using the REFramework, first try to close the application window otherwise kill the user process.

1 Like

@gujralsaurabh,

See the below image - Here I am trying to kill a Process from processList whoseName is Blank . I am not sure wether this will work .

For you process - You have to run the process in debug mode and see what all attributes you get for the item you want to Kill - That will be your If condition - This Sample Code is from the Link I shared above.


Mukesh

Thanks for the prompt help @mukeshkala. Let me give it a shot and get back to you with what happens.

Hi,

I am trying to do the same automation and facing the same issue. Did you find a solution for it? If yes, do let me know about it.

Thank You.