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
@@ -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;
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user