diff --git a/ModpackUpdater/Form1.vb b/ModpackUpdater/Form1.vb index 4cd3638..19f9e55 100644 --- a/ModpackUpdater/Form1.vb +++ b/ModpackUpdater/Form1.vb @@ -195,10 +195,11 @@ Public Class Form1 End Sub Private Async Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown - If Await AppUpdater.Check AndAlso RadMessageBox.Show(LangRes.MsgBox_UpdateAvailable, LangRes.MsgBox_UpdateAvailable_Title, MessageBoxButtons.YesNo, RadMessageIcon.Info) = DialogResult.Yes Then + Dim updater As New AppUpdater + If Await updater.Check AndAlso RadMessageBox.Show(LangRes.MsgBox_UpdateAvailable, LangRes.MsgBox_UpdateAvailable_Title, MessageBoxButtons.YesNo, RadMessageIcon.Info) = DialogResult.Yes Then SetStatus(LangRes.StatusText_InstallingAppUpdate, MySymbols.icons8_software_installer_16px) Enabled = False - Await AppUpdater.Install() + Await updater.Install Application.Restart() End If End Sub