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 / Power Automate - Opera...
Power Automate
Unanswered

Power Automate - OperationInNonInteractiveModeExceptio

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I'm using an remote windows server to run some scheduled desktop workflows triggered by the windows scheduler. 

When i'm with the RDP opened, the flow succesfully ran the UI action, but when i'm not, its returns:

 

Problema ao executar a ação 'PressButton'. Falha ao pressionar botão (erro ao pressionar botão)

Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Falha ao pressionar botão (erro ao pressionar botão) ---> Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Exceptions.OperationInNonInteractiveModeException: Can't use this action in non interactive mode
em Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Utilities.UIAutomationUtilities.EnsureThatDesktopInteractionIsPossible(UIATypeEnum uiaType, Boolean isLegacyWindowAction)
em Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Proxy.LocalAutomationRuntime.PressButtonInWindow(UIRuntimeElement element)
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Proxy.UIAutomationRuntimeRouter.Invoke(MethodInfo targetMethod, Object[] args)
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Reflection.DispatchProxyGenerator.Invoke(Object[] args)
--- Fim do rastreamento de pilha de exceção remota ---
em Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Proxy.RemoteAutomationRuntimeProxy.Invoke(MethodInfo targetMethod, Object[] args)
--- Fim do rastreamento de pilha do local anterior onde a exceção foi gerada ---
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em System.Reflection.DispatchProxyGenerator.Invoke(Object[] args)
em Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.UIAutomationActionBase.PerformAutomation(Action`2 action, UIControl control, Boolean logAction)
em Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.PressWindowButton.Execute(ActionContext context)
--- Fim do rastreamento de pilha de exceções internas ---
em Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.PressWindowButton.Execute(ActionContext context)
em Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

 

 

The server's user is always logged on. 

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Non-interactive mode means that the screen is not active when the flow runs and that UI actions cannot be performed. This would normally work fine when you are signed in, or if you were to run the flow from the cloud in unattended mode (assuming you have the unattended RPA add-on), as the flow would initiate a sign in on the machine.

     

    But when it's the Windows Task scheduler triggering the flow, there is no sign in activity being performed. So, if you have closed your remote desktop session (which will usually lead to the user being signed out from the VM), your flows will not be able to run this way.

     

    What you would need to do in such a case is build the schedule in cloud flows (I assume you have a paid license, as that would anyhow be needed to launch a PAD flow from the Windows Task scheduler) using unattended mode.

     

    An alternative could also be changing the parameters of the machine to never get locked and go to sleep, and then signing in to a machine with a different remote management software that does not cause a logoff event after you close your session. Some samples of that include TeamViewer, AnyDesk and similar apps. However, you should note that this is a security issue, because if anyone unauthorized gets access to the machine, they would also have access to your account, too.

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution.
    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 247 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 164 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 138 Super User 2026 Season 2

Last 30 days Overall leaderboard