From 82641c427daa654e320b31b6821e32c923817ec0 Mon Sep 17 00:00:00 2001 From: Tom Sullivan Date: Wed, 24 Nov 2021 19:51:02 +1100 Subject: [PATCH] Check `Environment.Is64BitOperatingSystem` before running Instead of checking the "PROCESSOR_ARCHITEW6432" environment variable, check `Environment.Is64BitOperatingSystem`, which should replicate the same information --- Windows11Upgrade/Program.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Windows11Upgrade/Program.cs b/Windows11Upgrade/Program.cs index 4dfdd84..5de2785 100644 --- a/Windows11Upgrade/Program.cs +++ b/Windows11Upgrade/Program.cs @@ -5,8 +5,7 @@ namespace Windows11Upgrade { internal static class Program { [STAThread] private static void Main() { - bool is32bit = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432")); - if (is32bit) { + if (!Environment.Is64BitOperatingSystem) { MessageBox.Show("32-bit systems are not supported!"); Environment.Exit(0); }