How to run Exe with parameters? #1155
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
It appears that API is attempting to run it's own process as admin, which is currently only supported on Windows 11 #896 |
Beta Was this translation helpful? Give feedback.
-
Actually I read this wrong... so the scenario is you want to distribute an EXE alongside your WinUI 3 MSIX desktop app, and you want to launch that EXE dynamically from your code as full trust. Since a WinUI 3 app is a desktop app, you can use the The thing that doesn't work on Windows 10 (only Windows 11) is running your own WinUI 3 app as elevated/admin. But you can request another process to launch as admin 😊 |
Beta Was this translation helpful? Give feedback.
Actually I read this wrong... so the scenario is you want to distribute an EXE alongside your WinUI 3 MSIX desktop app, and you want to launch that EXE dynamically from your code as full trust.
Since a WinUI 3 app is a desktop app, you can use the
Process.Start
API. Here's a full example of launching the VS installer, distributed within the app itself, requesting it to run elevated. You don't need to specify any<desktop:Extension>
in your manifest either. You should be able to pass arguments viaProcess.Start
too. And this works on Windows 10 😊The thing that doesn't work on Windows 10 (only Windows 11) is running your own WinUI 3 app as elevated/admin. But you can request another proce…