How invoke Microsoft Edge Chromium App web site installed

jssmttsharp

New member
Joined
May 26, 2021
Messages
1
Programming Experience
10+
hello,

Microsoft Edge Chromium allow the user to install web sites as web app and put them on the task bar.

My question is:

once the user has installed the site as web app, how can I invoke this app:

like web site installed as app "Microsoft - Official Home Page", how can I invoke from
System.Diagnostics.Process.Start( ????????????????????????????????? );
 
C#:
            Uri uri = new("https://csharpforums.net/");
            const string process = "microsoft-edge";
            _ = Process.Start(string.Join(":", process, uri.ToString()));
Shorter
C#:
            _ = Process.Start(string.Join(":", "microsoft-edge", new Uri("https://csharpforums.net/").ToString()));
Shorter
C#:
            _ = Process.Start("microsoft-edge:https://csharpforums.net/");
 
If you want to start an url in Edge in app mode it can be done like this:
C#:
Process.Start(new ProcessStartInfo("msedge.exe", "--app=https://microsoft.com/") { UseShellExecute = true });
To start an installed app, including Edge url apps:
C#:
Process.Start(new ProcessStartInfo(@"shell:appsFolder\AUMID") { UseShellExecute = true });
but you need the Application User Model ID (AUMID), look here to learn about these IDs: Find the Application User Model ID of an installed app - Configure Windows
Here are several ideas for working with them programmatically: Programmatically get list of installed application executables (Windows10, C#)

Both these options, and also the microsoft-edge: protocol suggested above, requires UseShellExecute=true, in .Net Core the default is false.
 
Back
Top Bottom