We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3ec002 commit 80c0288Copy full SHA for 80c0288
Flow.Launcher/Helper/AutoStartup.cs
@@ -78,8 +78,11 @@ private static bool CheckLogonTask(bool alwaysRunAsAdministrator)
78
}
79
else
80
{
81
- // If run level is not correct, we cannot edit it because we are not administrator
82
- if (!runLevelCorrect)
+ // If run level is not correct or we need to change a highest run level task,
+ // we cannot edit it because we are not administrator
83
+ // So we just throw an exception to let the user know
84
+ if (!runLevelCorrect || // run level is not correct
85
+ alwaysRunAsAdministrator) // we need to change a highest run level task
86
87
throw new UnauthorizedAccessException("Cannot edit task run level because the app is not running as administrator.");
88
0 commit comments