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

@@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
using System.Windows.Interop;
using ManagedCommon;
@@ -70,7 +69,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System
IcoPath = $"Images\\shutdown.{IconTheme}.png",
Action = c =>
{
Process.Start("shutdown", "/s /t 0");
Helper.OpenInShell("shutdown", "/s /t 0");
return true;
},
},
@@ -81,7 +80,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System
IcoPath = $"Images\\restart.{IconTheme}.png",
Action = c =>
{
Process.Start("shutdown", "/r /t 0");
Helper.OpenInShell("shutdown", "/r /t 0");
return true;
},
},