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 / UnAttended Flow - Can'...
Power Automate
Answered

UnAttended Flow - Can't populate text in cmd window

(0) ShareShare
ReportReport
Posted on by 133

Hi all 

 

I have a flow that populates text into a cmd window after opening the cmd window.

 

When I disconnect from the VDI where the flow ("Bot") is running,

everything appears to run well, connecting and dropping text on web sites...executing clicks 

But it can't seem to drop the text in a cmd window using "populate text field in window"

 

Running this flow while logged onto the machine runs like a dream.

 

YES.. I do have the unattended license for the entity the runs the flow. I can see that being the first question. 🙂

 

Any assistance would be greatly appreciated.

I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @CraigSparks37 

     

    Are you using these cmd actions to perform actions in CMD ?

     

    Nived_Nambiar_0-1702394402036.png

     

    Could you confirm that ?

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • CraigSparks37 Profile Picture
    133 on at

    I am not... let me look into that.. 

     

    I am using run application (cmd)

    and popluate text field to window and then send keys (return) etc.

     

    I hope you are right... cause then you would have saved my butt. 🙂

     

    I'll let you know.

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @CraigSparks37 

     

    may be that window is not coming in foreground while running so would that be the reason why it is getting failed 

     

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You should absolutely use the actions suggested by @Nived_Nambiar .

     

    But your post also raises another question - are you starting your flow while logged in to the machine and then close the session as the flow is running? If that's the case, the session screen will turn "black" as soon as you do, and the flow will fail. For unattended flows to run, you need to call it from a cloud flow and not have a user session active when it starts. The flow will create its own user session and will run on that.

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

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • CraigSparks37 Profile Picture
    133 on at

    The is on a windows scheduled task to fire every 2 minutes.

    The Flow definitely executes, just the writing to cmd window... 

    But I am working on changing it to use the CMD session events... just having a rough day... with other issues. 😞

    I will update if all good. Thanks everyone.

     

  • cwischnewski Profile Picture
    162 on at

    Are you really using a Cloud flow with the desktop flow being triggered to Unattended?  Because then the Unattended process will trigger a RDP session to be created logging into the machine as the user, both defined in the desktop flow connection.  So what is getting triggered by Windows Scheduled task?  And will it actually be available to the user session the unattended flow opens?  You might also consider adding a screenshot with the Workstation actions to see what is happening.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Having Task Scheduler running the flow is not "unattended". It actually needs to be attended, as Task Scheduler cannot auto-login and as such will likely fail if the user session is not active.

     

    If you want an unattended flow run, you need to run the desktop flow via the cloud portal in unattended mode.

    -------------------------------------------------------------------------

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

     

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • CraigSparks37 Profile Picture
    133 on at

    Apologies for the delay all.

     

    @Nived_Nambiar , your suggestion to use the CMD session events worked well, except that the flow there after terminates while trying to update the respective JIRA ticket comments and status.

     

    Through the holiday season I just made sure that I was logged in as the bot user, so that it ran.

    I'll be continuing on trying to sort out and understand why when I set up a cloud flow to call it unattended, it is not running... I'll provide more info... this is a big learning curve and hopefully all common issues. 🙂

     

    Compliments of New Year to you all.

  • CraigSparks37 Profile Picture
    133 on at

    Hi @Agnius , 

     

    The Unattended license is on the user (bot) in question. When I set up the cloud flow (on same user) to call the desktop PA unattended on the Virtual Machine (which is for same user), it says it is

    "Cannot create new session to execute unattended run."

     

    The Run I is:  033fd603-8eaf-ee11-a569-002248890df2

     

    I have scheduled on the cloud flow every 2 minutes.

     

    I have gone through all the posts I could find on this issue, and there is no real solution of sorts out there.

    Any Assistance will be greatly appreciated.

     

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 272 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 147 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 146 Super User 2026 Season 2

Last 30 days Overall leaderboard