From 3b3a59fd6266364814913d684c3455597aa831bc Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Tue, 24 Feb 2026 18:17:22 +0800 Subject: [PATCH] Fix process priority for logon startup task set to BelowNormal by default (#4283) --- Flow.Launcher/Helper/AutoStartup.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/Helper/AutoStartup.cs b/Flow.Launcher/Helper/AutoStartup.cs index 34700c610..1f057f839 100644 --- a/Flow.Launcher/Helper/AutoStartup.cs +++ b/Flow.Launcher/Helper/AutoStartup.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.Linq; using System.Security.Principal; using Flow.Launcher.Infrastructure; @@ -64,7 +65,9 @@ public class AutoStartup if (task.Definition.Actions.FirstOrDefault() is Microsoft.Win32.TaskScheduler.Action taskAction) { var action = taskAction.ToString().Trim(); - if (!action.Equals(Constant.ExecutablePath, StringComparison.OrdinalIgnoreCase)) + var needsRecreation = !action.Equals(Constant.ExecutablePath, StringComparison.OrdinalIgnoreCase) + || task.Definition.Settings.Priority != ProcessPriorityClass.Normal; + if (needsRecreation) { UnscheduleLogonTask(); ScheduleLogonTask(); @@ -184,6 +187,7 @@ public class AutoStartup td.Settings.StopIfGoingOnBatteries = false; td.Settings.DisallowStartIfOnBatteries = false; td.Settings.ExecutionTimeLimit = TimeSpan.Zero; + td.Settings.Priority = ProcessPriorityClass.Normal; try {