Close all applications

hi Guys I need help in closing all desktop applications. could some one guide me how can i do in. in production enviroment, do we kill or close applications based on user/login. how can i achieve it.

Thanks.

Hi @Rani1978

You can use kill process activity instead of close applicationbjust pass the process name in process within double quotes and check

Thanks
Ashwin.S

@Rani1978

I didnt get it, do you have a sample. It would be great if you can share. Many Thanks.
Also what if i have 4 desktop applications to close. I would use GetProcesses, loop at it, now I want to loop through the list of desktop applications that i want to kill. how can i achieve this.
Thanks again.

@Rani1978
Do you want to close all running process or just a specific process?

@Rani1978
Sequence1.xaml (5.4 KB)
This get then loop all the open process and find the notepad then close it. Just remove the if statement if you want to close all the processes.

Hi @Rani1978

Please try the attached workflow. It will kill all the foreground processes except UiPath.Executor and UiPath.Studio

Hope this will help Main.xaml (5.1 KB)

Thanks
Anoop

Hi when i open the file i see only missing activity. How can i rectify this. or is it possible to send the screen shot of the workflow.
Many thanks again.

image

Hi Anoop, I was able to open the xaml file. Thanks for the help.

Hi Anoop,
I have another doubt, When i am doing close application. do i put it in Try-Catch , if yes what should be in Catch, do we have kill process. In catch what should be the exception, should it be system or business exception.

Hi @Rani1978

You can use system exception depending on the further action you are taking. If it fails at the kill activity then you can retry the same.

Hi guys, can I ask for the link on where to ask questions? I am sorry I’m new to UiPath

@Mannix_Tapawan Click on New Topic and type your questions

Best Regards,
Vrushali

1 Like