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
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
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
After reading post provided i’m not able to figure out. It kills some of my local application and giving an error "RemoteException wrapping System.Exception: Job stopped with an unexpected exit code: 0xFFFFFFFF " is there a way to kill my rdp application before the program throw out with error. (using try catch activity)