Reputation: 25
I have created a simple flow on Power Automate. That flow simply opens up the Powershell (Powershell 7 x64), writes a command for upgrading applications
winget upgrade -h --all
and presses the "Enter" button. I had also made sure that I created the workflow from Power Automate Desktop in administrator mode (because I think I read somewhere that the "Run Application" process will run the application in admin mode if created from PAD in Admin mode) so that the application runs in admin mode. But when I open PA Desktop in normal mode and run the application, the application also runs in normal user mode and the script fails (somehow the text get's filled only when the Powershell is run on Admin Mode). Also since this is an automatic upgrade flow, I would like it to run automatically after every 2 weeks.
I have tried using the Shortcut Keys feature but looks like they work only when Power Automate Desktop is running. Really doesn't help much.
So there are 2 issues:
Upvotes: 0
Views: 1267
Reputation: 11262
This link helps but it won’t help you when it comes to the answer for question 2.
Bottom line, the way you’re running PAD is correct. If you want to always run PAD in admin mode then change your shortcut to do so.
I assume you’re running Windows 10.
Your question is a little bizarre given to run the desktop flow means you have to execute it using PA Desktop, I’m not sure how you think you can avoid it.
But, to run it on a scheduled basis needs to be done via PA cloud flows and that requires an ongoing licence.
https://learn.microsoft.com/en-us/power-automate/desktop-flows/trigger-desktop-flows
Now, having said that, this is where you may have seen the issue I was talking about from the answer I gave to your first question.
You’ll find this very important point in the documentation.
When a desktop flow is triggered by a cloud flow, the actions contained in the desktop flow that require elevated privileges won't have any effect. Therefore, Power Automate won't be able to access applications that run with elevated rights.
So you may be stuck on that one.
I’d suggest running your script via Windows Scheduler, much easier.
Upvotes: 0