From 807f0aba06f6a80772bb97999dc855783ed53988 Mon Sep 17 00:00:00 2001 From: YFdyh000 Date: Sat, 23 May 2026 13:58:00 +0800 Subject: [PATCH] Make Admin AutoRun faster (#9366) * Set Admin AutoRun task priority to Normal rather than Below Normal * Remove 30s delay for Admin AutoRun --- v2rayN/ServiceLib/Handler/AutoStartupHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2rayN/ServiceLib/Handler/AutoStartupHandler.cs b/v2rayN/ServiceLib/Handler/AutoStartupHandler.cs index fd7d7fc9..acd9a515 100644 --- a/v2rayN/ServiceLib/Handler/AutoStartupHandler.cs +++ b/v2rayN/ServiceLib/Handler/AutoStartupHandler.cs @@ -111,7 +111,8 @@ public static class AutoStartupHandler task.Settings.RunOnlyIfIdle = false; task.Settings.IdleSettings.StopOnIdleEnd = false; task.Settings.ExecutionTimeLimit = TimeSpan.Zero; - task.Triggers.Add(new Microsoft.Win32.TaskScheduler.LogonTrigger { UserId = logonUser, Delay = TimeSpan.FromSeconds(30) }); + task.Settings.Priority = ProcessPriorityClass.Normal; + task.Triggers.Add(new Microsoft.Win32.TaskScheduler.LogonTrigger { UserId = logonUser }); task.Principal.RunLevel = Microsoft.Win32.TaskScheduler.TaskRunLevel.Highest; task.Actions.Add(new Microsoft.Win32.TaskScheduler.ExecAction(fileName.AppendQuotes(), null, Path.GetDirectoryName(fileName)));