Merge pull request #4848 from 1208nn/patch-2

Update schdtask related code
pull/5655/head
2dust 2024-03-16 16:25:58 +08:00 committed by GitHub
commit 3b4cc2c5f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -1136,7 +1136,7 @@ namespace v2rayN
task.Settings.ExecutionTimeLimit = TimeSpan.Zero; task.Settings.ExecutionTimeLimit = TimeSpan.Zero;
task.Triggers.Add(new LogonTrigger { UserId = logonUser, Delay = TimeSpan.FromSeconds(10) }); task.Triggers.Add(new LogonTrigger { UserId = logonUser, Delay = TimeSpan.FromSeconds(10) });
task.Principal.RunLevel = TaskRunLevel.Highest; task.Principal.RunLevel = TaskRunLevel.Highest;
task.Actions.Add(new ExecAction(deamonFileName)); task.Actions.Add(new ExecAction(deamonFileName, null, Path.GetDirectoryName(deamonFileName)));
taskService.RootFolder.RegisterTaskDefinition(TaskName, task); taskService.RootFolder.RegisterTaskDefinition(TaskName, task);
} }
@ -1186,4 +1186,4 @@ namespace v2rayN
#endregion Windows API #endregion Windows API
} }
} }