common helper for execute shell process from run plugins (#9538)

This commit is contained in:
Davide Giacometti
2021-02-23 09:53:08 +01:00
committed by GitHub
parent 20a922ce21
commit 571bceb386
17 changed files with 77 additions and 128 deletions

View File

@@ -10,6 +10,7 @@ using System.Linq;
using System.Reflection;
using System.ServiceProcess;
using Microsoft.PowerToys.Run.Plugin.Service.Properties;
using Wox.Infrastructure;
using Wox.Plugin;
using Wox.Plugin.Logger;
@@ -90,20 +91,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Service.Helpers
public static void OpenServices()
{
try
{
var info = new ProcessStartInfo
{
FileName = "services.msc",
UseShellExecute = true,
};
Process.Start(info);
}
catch (Win32Exception ex)
{
Log.Error(ex.Message, MethodBase.GetCurrentMethod().DeclaringType);
}
Helper.OpenInShell("services.msc");
}
private static string GetResultTitle(ServiceController serviceController)

View File

@@ -71,6 +71,7 @@
<ItemGroup>
<ProjectReference Include="..\..\Wox.Plugin\Wox.Plugin.csproj" />
<ProjectReference Include="..\..\Wox.Infrastructure\Wox.Infrastructure.csproj" />
</ItemGroup>
<ItemGroup>