Component To closes all Running applications that can be opened in windows, except Uipath Studio +UiRobot


#1

Hey Folks

Here i am sharing a simple workflow script which will kill all running application process on windows instead of All process like windows services.

It will be helpful where we want to close all other running applications(like pdf, chrome, Edge,Internet Explorer, spotify, etc) for a fresh start of our robot or setting a stage for robot to run in a clean environment :slight_smile:

Note: we can kill the file explorer of windows as well but it is a required process by windows(it is a windows os required process) so even if we will try to kill it, it will get restart :slight_smile:

Kill All running process except one.xaml (8.2 KB)

Regards…!!
Aksh


How to kill EXCEL application sub-processes via specific name?
How to Close Multiple App At Once?
#2

Hello,

One question, could it be done without a kill process, and with a Close application?

Thanks!


#3

Well we will close the process with Closewindow but CloseMainWindow does not force the application to quit. The application can ask for user verification before quitting, or it can refuse to quit.

The Close method causes the process to stop waiting for exit if it was waiting, closes the process handle, and clears process-specific properties. Close does not close the standard output, input, and error readers and writers in case they are being referenced externally.

Kill forces a termination of the process without any quit prompt.

So if you are ready to handle at your end the application quit prompt then you can use CloseMainWindow.
Otherwise better to clear all application forcefully :slight_smile:

Regards…!!
Aksh


#4

When I tried this, the robot seems to try to kill UiPath.Executor, may be UiPath.Executor should be added to the list upon usage :wink: