mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Throw exception when editing highest run level task
This commit is contained in:
parent
c3ec002b72
commit
80c0288235
1 changed files with 5 additions and 2 deletions
|
|
@ -78,8 +78,11 @@ public class AutoStartup
|
|||
}
|
||||
else
|
||||
{
|
||||
// If run level is not correct, we cannot edit it because we are not administrator
|
||||
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
|
||||
// So we just throw an exception to let the user know
|
||||
if (!runLevelCorrect || // run level is not correct
|
||||
alwaysRunAsAdministrator) // we need to change a highest run level task
|
||||
{
|
||||
throw new UnauthorizedAccessException("Cannot edit task run level because the app is not running as administrator.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue