Skip to content

Commit

Permalink
* Fixed an issue with updates being checked twice when running automa…
Browse files Browse the repository at this point in the history
…tically as an administrator
  • Loading branch information
wceuppens committed May 1, 2018
1 parent f1295eb commit c75f143
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions MemPlus/Views/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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);
Expand Down

0 comments on commit c75f143

Please sign in to comment.