Skip to content

Commit 898dbb8

Browse files
committed
Use new api for uwp package opening
1 parent 2c0210c commit 898dbb8

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Diagnostics;
43
using System.IO;
54
using System.Linq;
65
using System.Security.Principal;
@@ -516,14 +515,8 @@ private void Launch(bool elevated = false)
516515
var command = "shell:AppsFolder\\" + UserModelId;
517516
command = Environment.ExpandEnvironmentVariables(command.Trim());
518517

519-
var info = new ProcessStartInfo()
520-
{
521-
FileName = command,
522-
UseShellExecute = true,
523-
Verb = elevated ? "runas" : ""
524-
};
525-
526-
_ = Task.Run(() => Main.StartProcess(Process.Start, info)).ConfigureAwait(false);
518+
_ = Task.Run(() => Main.Context.API.StartProcess(
519+
command, string.Empty, string.Empty, true, elevated ? "runas" : ""));
527520
}
528521

529522
internal static bool IfAppCanRunElevated(XmlNode appNode)

0 commit comments

Comments
 (0)