mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
common helper for execute shell process from run plugins (#9538)
This commit is contained in:
committed by
GitHub
parent
20a922ce21
commit
571bceb386
@@ -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)
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Wox.Plugin\Wox.Plugin.csproj" />
|
||||
<ProjectReference Include="..\..\Wox.Infrastructure\Wox.Infrastructure.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user