web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Long Lasting Flow on R...
Power Automate
Answered

Long Lasting Flow on Remote Desktop [mstsc]

(0) ShareShare
ReportReport
Posted on by 4

I have a flow that lasts for hours and I want to run the flow on my remote desktop at work from home PC and then signoff from my remote desktop and keep it running.

 

The issue is that one of the steps in the flow is "focus window" and it crashes once I signoff the remote desktop.

 

I've tried this solution but didn't manage to make it work: https://www.youtube.com/watch?v=-r5sJpqY73k

 

Is there any other way how to launch the flow on remote desktops?

 

Thanks!

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @farb Hope you are doing well!!

     

    Could you please elaborate your issue with some screenshot with your PAD code pls?

     

    Thanks,

    Deenu

     

     
  • CU05081807-0 Profile Picture
    4 on at

    farb_0-1708426917035.png

    Here is the flow - the issue is on step 57 where it tried to get the name of Active Window because when I'm getting logged off my remote desktop after 10 minutes due to security reasons. 

     

    Is there a way to launch such flow on the background unattended?

  • CU05081807-0 Profile Picture
    4 on at

    PS: The 4x move mouse actions are there just to trick the machine that I'm still here and to not log me off however I'd like to run such flow on the background unattended without paying attention to it 😕

  • eetuRobo Profile Picture
    4,547 Super User 2026 Season 1 on at

    I don't think you can run Power Automate Desktop unattended without having the unattended license for it and launching it from Power Automate Cloud.
    If you run the flow from the Power Automate Desktop and log off the flow fails since its not running in unattended. Either you need to stay logged in or run the flow from cloud in unattended mode (you need pay for the Power Automate Process plan)

    https://www.youtube.com/watch?v=EUhNahpR_l4

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @farb 

    While your bots are running from cloud flow, how have you configured your desktop flow? Have you configured it with an attended flow or an unattended flow? Please confirm.

     

    Thanks,

    Deenu 

  • CU05081807-0 Profile Picture
    4 on at

    I tried both and it just doesn't work because it always crashes when trying to find the selector. The UI automation actions are the problem here. I'll have to think about some other solution.

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @farb - Could you please share some screenshot to understand what are the parameters you've configured on step 57?

     

    Thanks,

    Deenu

  • CU05081807-0 Profile Picture
    4 on at

    I've reworked the flow not to use the (Window) actions that seemed to be the problem but it still crashes on UI automation (steps 28+) when the remote desktop window is inactive or if I sign off. It just won't find the element once the remote desktop window is not open.

     

    farb_0-1708437568910.png

     

  • Verified answer
    Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @farb - I think you are trying to achieve the unattended automation.

     

    If you wish to execute your flows even when you are not signed in or when the system is locked, you will need to purchase an unattended license (Power Automate Process plan - $150 per machine). Alternatively, if you are comfortable running your flow while your system is signed in or in active mode, an attended license is sufficient, but you must keep your machine active until the process completes else it may get failed like you reported only(when system got locked or becomes inactive).

     

    Thanks,

    Deenu

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @farb 

     

    If I have addressed your queries successfully, kindly consider marking my response as the preferred solution. If you found my assistance helpful, a 'Thumbs Up' would be greatly appreciated.

     

    Thanks,

    Deenu

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 376

#2
Valantis Profile Picture

Valantis 361

#3
David_MA Profile Picture

David_MA 294 Super User 2026 Season 1

Last 30 days Overall leaderboard