diff --git a/MemPlus/Views/Windows/MainWindow.xaml.cs b/MemPlus/Views/Windows/MainWindow.xaml.cs index fddd5c2..9383ff4 100644 --- a/MemPlus/Views/Windows/MainWindow.xaml.cs +++ b/MemPlus/Views/Windows/MainWindow.xaml.cs @@ -89,6 +89,18 @@ public MainWindow() try { + if (!Utils.IsAdministrator()) + { + if (Properties.Settings.Default.RunAsAdministrator) + { + Utils.RunAsAdministrator(_logController); + } + else if (Properties.Settings.Default.AdministrativeWarning) + { + MessageBox.Show("MemPlus might not function correctly without administrative rights!", "MemPlus", MessageBoxButton.OK, MessageBoxImage.Information); + } + } + _logController.AddLog(new ApplicationLog("Checking for application updates")); if (Properties.Settings.Default.AutoUpdate) { @@ -105,18 +117,6 @@ public MainWindow() WindowState = WindowState.Minimized; } - if (!Utils.IsAdministrator()) - { - if (Properties.Settings.Default.RunAsAdministrator) - { - Utils.RunAsAdministrator(_logController); - } - else if (Properties.Settings.Default.AdministrativeWarning) - { - MessageBox.Show("MemPlus might not function correctly without administrative rights!", "MemPlus", MessageBoxButton.OK, MessageBoxImage.Information); - } - } - if (Properties.Settings.Default.StartupMemoryClear) { ClearMemory(0);