From 3bd4ca4105840ab4a679a21817148ade91660263 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 18 Feb 2025 11:17:45 +0800 Subject: [PATCH] Replace hiberate with PInvoke --- Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs index 3bda99e71..e81d70c52 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/Main.cs @@ -269,12 +269,7 @@ namespace Flow.Launcher.Plugin.Sys IcoPath = "Images\\hibernate.png", Action= c => { - var info = ShellCommand.SetProcessStartInfo("shutdown", arguments:"/h"); - info.WindowStyle = ProcessWindowStyle.Hidden; - info.UseShellExecute = true; - - ShellCommand.Execute(info); - + PInvoke.SetSuspendState(true, false, false); return true; } },