Hi, In my citrix automation whenever i login in to RDP, I need to close all the applications which is opened, how to do?
Hi @Mayur_N
after logging into rdp, use the get processes activity to list running applications. filter the processes you want to close by name. then use kill process in a loop to close each application.
Happy Automation
Hi @Mayur_N
To close all open applications after RDP login in UiPath:
- Iterate and Close Windows:
- Use
Find Elements(selector:<wnd app='*' title='*' />) to get all open windowUiElements. - Use a
For Eachloop (TypeArgument:UiElement) to go through each found window. - Inside the loop, use
Close Applicationactivity targeting the currentUiElement. SetContinueOnErrortoTrue. - (Optional but recommended): Add
Element Existsfor “Save?” prompts andClick“Don’t Save”/“No” if found.
- Forceful Kill (Fallback):
- Add
Kill Processactivities for common application process names (e.g.,excel.exe,chrome.exe). - Set
ContinueOnErrortoTrue.