Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Desktop run Powershell commands

Tags:

flutter

I want to ask if it is possible to run PowerShell Code with Flutter Desktop for Windows. I found the package process_run on pub.dev. With that i can run Shell Commands but i have to do a workaround and start a PowerShell command with that. is there a direct way to send PowerShell commands?

like image 883
Daniel Ehrhardt Avatar asked Dec 20 '25 20:12

Daniel Ehrhardt


1 Answers

There is an issue on that same repo asking about Powershell

Based on the answer from the repo owner, you may do something like:

// You can run a command
await shell.run('powershell -c "pwd"');
// You can run a power shell script
await shell.run('powershell script.ps1');
like image 146
Gpack Avatar answered Dec 23 '25 11:12

Gpack



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!