Share via

Is it possible to embed a win32 .exe into a UWP app so it (the win32 .exe) can be launched by a browser extension and communicate with the browser extension via stdin/stdout ?

Gireg de Kerdanet 21 Reputation points
2021-05-25T18:47:31.577+00:00

Everything is in the title.
My goal is to let a browser extension read and write files in the private data folder of my UWP app. This .exe file would implement the native messaging protocol via stdin/stdout to communicate with the browser extension since the UWP app itself cannot do it.

I would then have to add an entry in the registry to point to the native messaging host manifest (which itself points to this .exe) but that's for another question.

Developer technologies | Universal Windows Platform (UWP)

1 answer

Sort by: Most helpful
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,871 Reputation points
    2021-05-26T02:32:43.717+00:00

    Hello, Welcome to Micorosoft Q&A,

    if you have embed win32 exe into UWP app as desktop-bridge extension. you can't launch this exe from browser extension, even if you could launch it with path, but this exe is run in the independent process, and it has no permission to access UWP local folder. For your scenario, the better way is register url scheme for UWP app, and launch uwp app with this scheme then call FullTrustProcessLauncher to start embed exe to make native messaging protocol via stdin/stdout .


    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.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.