question

SmilingMoon avatar image
0 Votes"
SmilingMoon asked SmilingMoon answered

How to launch platform specific Executable of desktop:Extension from UWP

UWP runs systray extension Windows Form app (runs various win32 tasks).

             <desktop:Extension Category="windows.fullTrustProcess" Executable="Assets\SysTray\SysTrayExtension.exe" />


However, I like to launch the exe based on the platform of running UWP app.
Is there a way specify placehold of platform like
Executable="Assets\SysTray[platform]\SysTrayExtension.exe"

Is it doable?
Thank you,

windows-uwp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NicoZhu-MSFT avatar image
0 Votes"
NicoZhu-MSFT answered

Hello, Welcome to Micorosoft Q&A,

Is there a way specify placehold of platform like Executable="Assets\SysTray[platform]\SysTrayExtension.exe"

I'm afraid you can't specify the placehold of platform like above, because Executable field was written in the package manifest, it can't be update in the runtime.

For your scenario, the better way is make a middle launcher(win32), and launch each platform app with Process.Start() method. For detail steps, please refer stefan's blog UWP with Desktop Extension – Part 2.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SmilingMoon avatar image
1 Vote"
SmilingMoon answered

I found that I got the wrong way. I need to create "Windows Application Packaging Project" instead of copying the files.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.