File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11using System ;
2+ using System . Diagnostics ;
23using System . Linq ;
34using System . Security . Principal ;
45using Flow . Launcher . Infrastructure ;
@@ -64,7 +65,9 @@ private static bool CheckLogonTask()
6465 if ( task . Definition . Actions . FirstOrDefault ( ) is Microsoft . Win32 . TaskScheduler . Action taskAction )
6566 {
6667 var action = taskAction . ToString ( ) . Trim ( ) ;
67- if ( ! action . Equals ( Constant . ExecutablePath , StringComparison . OrdinalIgnoreCase ) )
68+ var needsRecreation = ! action . Equals ( Constant . ExecutablePath , StringComparison . OrdinalIgnoreCase )
69+ || task . Definition . Settings . Priority != ProcessPriorityClass . Normal ;
70+ if ( needsRecreation )
6871 {
6972 UnscheduleLogonTask ( ) ;
7073 ScheduleLogonTask ( ) ;
@@ -184,6 +187,7 @@ private static bool ScheduleLogonTask()
184187 td . Settings . StopIfGoingOnBatteries = false ;
185188 td . Settings . DisallowStartIfOnBatteries = false ;
186189 td . Settings . ExecutionTimeLimit = TimeSpan . Zero ;
190+ td . Settings . Priority = ProcessPriorityClass . Normal ;
187191
188192 try
189193 {
You can’t perform that action at this time.
0 commit comments