From a2a00e7c2ac9fe3f2b0a93c031791e2d517c732b Mon Sep 17 00:00:00 2001 From: WinExperiments <91428431+WinExperiments@users.noreply.github.com> Date: Sat, 4 Nov 2023 02:26:26 +0200 Subject: [PATCH] Added a version check for new Canary builds --- Rectify11Installer/Program.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Rectify11Installer/Program.cs b/Rectify11Installer/Program.cs index c4f6bb43f..25e55e6e8 100644 --- a/Rectify11Installer/Program.cs +++ b/Rectify11Installer/Program.cs @@ -68,6 +68,35 @@ private static void Main(string[] args) if (!yes) return; } } + if (Environment.OSVersion.Version.Build >= 25977) + { + if (args.Length != 0 && args[0].ToLower() == "--allow") + { } + else + { + bool yes = false; + TaskDialog td = new(); + td.Page.Text = Strings.Rectify11.tooNewBuild; + td.Page.Instruction = Strings.Rectify11.compatWarnInstruc; + td.Page.Title = Strings.Rectify11.Title; + td.Page.StandardButtons = TaskDialogButtons.OK; + td.Page.Icon = TaskDialogStandardIcon.SecurityWarningYellowBar; + td.Page.EnableHyperlinks = true; + TaskDialogExpander tde = new(); + tde.Text = "Run anyway (not recommended)"; + tde.Expanded = false; + tde.CollapsedButtonText = Strings.Rectify11.moreInfo; + tde.ExpandedButtonText = Strings.Rectify11.lessInfo; + td.Page.HyperlinkClicked += (s, e) => + { + yes = true; + td.Close(); + }; + td.Page.Expander = tde; + td.Show(); + if (!yes) return; + } + } ProfileOptimization.SetProfileRoot(Path.Combine(Path.GetTempPath(), "Rectify11")); ProfileOptimization.StartProfile("Startup.Profile"); if (Environment.OSVersion.Version.Build >= 10240)