Search code examples
uwpwindows-10win32-processdesktop-bridge

Can we launch multiple full-trust apps from UWP?


I have a win32 application (let me call it win32#1), I create a Win32 folder under my uwp apps, and copy the executable of my win32 app to this folder, I also modify the Package.appxmanifest to include my win32 app. Then I can use the FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync() to launch my win32 apps. I have this done:

    private async Task<bool> LaunchWin32Number1()
    {
        try
        {
            await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
            return true;
        }
        catch (Exception)
        {
            return false;
        }
    }

Now I have another win32 application, let me call it win32#2, is there a way I can launch both win32#1 and win32#2 in my uwp app? e.g. Button 1 clicked in uwp I will launch win32#1, Button 2 clicked in uwp I will launch win32#2.

I want to know whether this is possible, and then I really appreciate it if someone can point me some documents or examples how to do that.

Or if the only way is uwp launches a win32 app#0, then let win32#0 to start #1 or #2.


Solution

  • You can declare only one "windows.fullTrustProcess" extension per application, but from that EXE you can launch any number of additional EXE's that come with your package. So one way to go about this is to declare an EXE as "windows.fullTrustProcess" that is essentially a launcher for your other EXE's which will then be launched based on parameters, or other input.