diff --git a/Bloxstrap/Helpers/Updater.cs b/Bloxstrap/Helpers/Updater.cs index c3964aa3..e551f191 100644 --- a/Bloxstrap/Helpers/Updater.cs +++ b/Bloxstrap/Helpers/Updater.cs @@ -23,11 +23,21 @@ public static void CheckInstalledVersion() if (installedVersionInfo.ProductVersion != currentVersionInfo.ProductVersion) { - DialogResult result = Program.ShowMessageBox( - $"The version of {Program.ProjectName} you've launched is different to the version you currently have installed.\nWould you like to update your currently installed version?", - MessageBoxIcon.Question, - MessageBoxButtons.YesNo - ); + DialogResult result; + + if (Program.IsUpgrade) + { + result = DialogResult.Yes; + } + else + { + result = Program.ShowMessageBox( + $"The version of {Program.ProjectName} you've launched is different to the version you currently have installed.\nWould you like to upgrade your currently installed version?", + MessageBoxIcon.Question, + MessageBoxButtons.YesNo + ); + } + if (result == DialogResult.Yes) { @@ -42,9 +52,11 @@ public static void CheckInstalledVersion() MessageBoxButtons.OK ); - new Preferences().ShowDialog(); - - Program.Exit(); + if (!Program.IsQuiet) + { + new Preferences().ShowDialog(); + Program.Exit(); + } } } diff --git a/Bloxstrap/Program.cs b/Bloxstrap/Program.cs index 2a56e6a9..49b97244 100644 --- a/Bloxstrap/Program.cs +++ b/Bloxstrap/Program.cs @@ -36,6 +36,7 @@ internal static class Program public static bool IsQuiet { get; private set; } = false; public static bool IsUninstall { get; private set; } = false; public static bool IsNoLaunch { get; private set; } = false; + public static bool IsUpgrade { get; private set; } = false; public static string LocalAppData { get; private set; } = null!; public static string StartMenu { get; private set; } = null!; @@ -87,6 +88,9 @@ static void Main(string[] args) if (Array.IndexOf(args, "-nolaunch") != -1) IsNoLaunch = true; + + if (Array.IndexOf(args, "-upgrade") != -1) + IsUpgrade = true; } // check if installed