mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix process priority for logon startup task set to BelowNormal by default (#4283)
Some checks are pending
Build / build (push) Waiting to run
Some checks are pending
Build / build (push) Waiting to run
This commit is contained in:
parent
73f657f84e
commit
3b3a59fd62
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue