From 898dbb8402c26b4e653a82b4abc99e336f4339c1 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Fri, 13 Jun 2025 13:30:51 +0800 Subject: [PATCH] Use new api for uwp package opening --- .../Programs/UWPPackage.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs index 182f3fed5..646079946 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using System.Security.Principal; @@ -516,14 +515,8 @@ namespace Flow.Launcher.Plugin.Program.Programs var command = "shell:AppsFolder\\" + UserModelId; command = Environment.ExpandEnvironmentVariables(command.Trim()); - var info = new ProcessStartInfo() - { - FileName = command, - UseShellExecute = true, - Verb = elevated ? "runas" : "" - }; - - _ = Task.Run(() => Main.StartProcess(Process.Start, info)).ConfigureAwait(false); + _ = Task.Run(() => Main.Context.API.StartProcess( + command, string.Empty, string.Empty, true, elevated ? "runas" : "")); } internal static bool IfAppCanRunElevated(XmlNode appNode)