From 3cdc8a0172b6045fe0e0764714164db3a14f6ec4 Mon Sep 17 00:00:00 2001 From: Jakob Date: Fri, 4 Nov 2022 17:13:00 +0100 Subject: [PATCH 01/96] add more nvidia api checks --- EnvyUpdate/MainWindow.xaml.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs index 8748023..553dc42 100644 --- a/EnvyUpdate/MainWindow.xaml.cs +++ b/EnvyUpdate/MainWindow.xaml.cs @@ -165,9 +165,18 @@ namespace EnvyUpdate gpuURL = "http://www.nvidia.com/Download/processDriver.aspx?psid=" + psid.ToString() + "&pfid=" + pfid.ToString() + "&osid=" + osid.ToString() + "&dtcid=" + dtcid.ToString() + "&dtid=" + dtid.ToString(); // + "&lid=" + langid.ToString(); WebClient c = new WebClient(); gpuURL = c.DownloadString(gpuURL); - if (!gpuURL.Contains("://")) + if (gpuURL.Contains("https://") || gpuURL.Contains("http://")) { - //This means a relative link was used. + //absolute url + } + else if (gpuURL.Contains("//")) + { + //protocol agnostic url + gpuURL = "https:" + gpuURL; + } + else + { + //relative url gpuURL = "https://www.nvidia.com/Download/" + gpuURL; } string pContent = c.DownloadString(gpuURL); From 91442e7eddd755898b4d5afd930e9d8b1d024907 Mon Sep 17 00:00:00 2001 From: Jakob Date: Fri, 4 Nov 2022 17:16:19 +0100 Subject: [PATCH 02/96] catch worst-case --- EnvyUpdate/MainWindow.xaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs index 553dc42..9c0e0db 100644 --- a/EnvyUpdate/MainWindow.xaml.cs +++ b/EnvyUpdate/MainWindow.xaml.cs @@ -174,11 +174,18 @@ namespace EnvyUpdate //protocol agnostic url gpuURL = "https:" + gpuURL; } - else + else if (gpuURL.StartsWith("driverResults.aspx")) { //relative url gpuURL = "https://www.nvidia.com/Download/" + gpuURL; } + else + { + //panic. + MessageBox.Show("ERROR: Invalid API response from Nvidia. Please file an issue on GitHub."); + Environment.Exit(10); + } + string pContent = c.DownloadString(gpuURL); var pattern = @"Windows\/\d{3}\.\d{2}"; Regex rgx = new Regex(pattern); From 06122111aafbeb5aeb06c7959ca89f9af3fdb755 Mon Sep 17 00:00:00 2001 From: Jakob Date: Mon, 26 Dec 2022 15:34:44 +0100 Subject: [PATCH 03/96] update readme, project format --- EnvyUpdate/Debug.cs | 2 +- EnvyUpdate/EnvyUpdate.csproj | 72 +++++++++++------------------------ EnvyUpdate/MainWindow.xaml.cs | 12 +++--- EnvyUpdate/Util.cs | 2 +- EnvyUpdate/packages.config | 17 --------- README.md | 4 +- 6 files changed, 33 insertions(+), 76 deletions(-) delete mode 100644 EnvyUpdate/packages.config diff --git a/EnvyUpdate/Debug.cs b/EnvyUpdate/Debug.cs index f2f8e91..30a49cd 100644 --- a/EnvyUpdate/Debug.cs +++ b/EnvyUpdate/Debug.cs @@ -9,7 +9,7 @@ namespace EnvyUpdate public static int LoadFakeIDs(string idType) { /* - * Usage: Supply /debug flag to exe. Imitates a GTX 1080ti on Win10 x64 non-dch Game Ready Driver. + * Usage: Supply /debug flag to exe. Imitates a GTX 1080ti on Win10 x64 DCH Game Ready Driver. */ switch (idType) { diff --git a/EnvyUpdate/EnvyUpdate.csproj b/EnvyUpdate/EnvyUpdate.csproj index d4b1588..d532191 100644 --- a/EnvyUpdate/EnvyUpdate.csproj +++ b/EnvyUpdate/EnvyUpdate.csproj @@ -1,7 +1,5 @@  - - Debug @@ -74,49 +72,13 @@ app.manifest - - ..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll - - - ..\packages\Hardcodet.NotifyIcon.Wpf.1.1.0\lib\net472\Hardcodet.NotifyIcon.Wpf.dll - - - ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - - ..\packages\Notifications.Wpf.0.1.1\lib\net461\Notifications.Wpf.dll - - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll - - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - - ..\packages\System.Text.Encodings.Web.6.0.0\lib\net461\System.Text.Encodings.Web.dll - - - ..\packages\System.Text.Json.6.0.1\lib\net461\System.Text.Json.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - @@ -188,7 +150,6 @@ Resources.Designer.cs - SettingsSingleFileGenerator Settings.Designer.cs @@ -226,16 +187,27 @@ false + + + 4.1.0 + + + 6.6.0 + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + 1.1.0 + + + 0.1.1 + + + 2.1.1 + + + 6.0.1 + + - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - \ No newline at end of file diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs index 9c0e0db..e04671f 100644 --- a/EnvyUpdate/MainWindow.xaml.cs +++ b/EnvyUpdate/MainWindow.xaml.cs @@ -49,11 +49,6 @@ namespace EnvyUpdate GlobalVars.isMobile = Util.IsMobile(); - if (Util.IsDCH()) - textblockLocalType.Text = "DCH"; - else - textblockLocalType.Text = "Standard"; - string locDriv = Util.GetLocDriv(); if (locDriv != null) { @@ -78,6 +73,13 @@ namespace EnvyUpdate } } + if (Util.IsDCH()) + textblockLocalType.Text = "DCH"; + else if (isDebug) + textblockLocalType.Text = "DCH (Debug)"; + else + textblockLocalType.Text = "Standard"; + // Check for startup shortcut if (File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "EnvyUpdate.lnk"))) { diff --git a/EnvyUpdate/Util.cs b/EnvyUpdate/Util.cs index 47ae34d..76d5871 100644 --- a/EnvyUpdate/Util.cs +++ b/EnvyUpdate/Util.cs @@ -329,7 +329,7 @@ namespace EnvyUpdate } /// /// Checks Windows registry for Nvidia DCH Key. If it is present, returns true. - /// Can also check file system for existance of DLL if registry access fails + /// Can also check file system for existence of DLL if registry access fails /// /// public static bool IsDCH() diff --git a/EnvyUpdate/packages.config b/EnvyUpdate/packages.config deleted file mode 100644 index 7c39521..0000000 --- a/EnvyUpdate/packages.config +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index d25d870..bdaf1c0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Important Information -Nvidia seems to have discontinued non-DCH drivers. This means only Windows 10 and Windows 11 can get the most recent driver versions. +Nvidia has discontinued non-DCH drivers. This means only Windows 10 and Windows 11 can get the most recent driver versions. If you are running Standard (non-DCH) drivers right now, EnvyUpdate will **NOT** display newer driver versions until you have manually updated to DCH drivers. @@ -23,7 +23,7 @@ Enabling Autostart will create a shortcut of EnvyUpdate in the Windows startup f ## Compatibility -The application should be compatible with all Nvidia GeForce GPUs that have their drivers available on the nvidia.com download page and runs on Windows 7 and up. +The application should be compatible with all Nvidia GeForce GPUs that have their drivers available on the nvidia.com download page and runs on Windows 10 and up. It is tested with GeForce Series GPUs. Generally others might work, but they are (currently) untested. From e054fda4dd0addd3425a8921abb112ab1df489b7 Mon Sep 17 00:00:00 2001 From: Jakob Date: Mon, 26 Dec 2022 15:40:01 +0100 Subject: [PATCH 04/96] update deps --- EnvyUpdate/EnvyUpdate.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EnvyUpdate/EnvyUpdate.csproj b/EnvyUpdate/EnvyUpdate.csproj index d532191..8011529 100644 --- a/EnvyUpdate/EnvyUpdate.csproj +++ b/EnvyUpdate/EnvyUpdate.csproj @@ -192,7 +192,7 @@ 4.1.0 - 6.6.0 + 6.6.4 runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -203,10 +203,10 @@ 0.1.1 - 2.1.1 + 2.2.0 - 6.0.1 + 7.0.1 From 2c0da5f9ea1d8185b174da8c17fc1cf311dc87f1 Mon Sep 17 00:00:00 2001 From: Jakob Date: Mon, 26 Dec 2022 16:05:21 +0100 Subject: [PATCH 05/96] update framework, change notification library --- EnvyUpdate/App.config | 30 +++++++++++----------- EnvyUpdate/EnvyUpdate.csproj | 8 ++++-- EnvyUpdate/InfoWindow.xaml | 2 +- EnvyUpdate/Properties/Settings.Designer.cs | 22 +++++++--------- README.md | 2 +- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/EnvyUpdate/App.config b/EnvyUpdate/App.config index 8dde225..1027a8f 100644 --- a/EnvyUpdate/App.config +++ b/EnvyUpdate/App.config @@ -1,34 +1,34 @@ - + - + - - + + - - + + - - + + - - + + - - + + - - + + - \ No newline at end of file + diff --git a/EnvyUpdate/EnvyUpdate.csproj b/EnvyUpdate/EnvyUpdate.csproj index 8011529..b6c1810 100644 --- a/EnvyUpdate/EnvyUpdate.csproj +++ b/EnvyUpdate/EnvyUpdate.csproj @@ -8,7 +8,7 @@ WinExe EnvyUpdate EnvyUpdate - v4.7.2 + v4.8 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 @@ -31,6 +31,7 @@ false false true + AnyCPU @@ -188,7 +189,7 @@ - + 4.1.0 @@ -199,6 +200,9 @@ 1.1.0 + + 6.1.1 + 0.1.1 diff --git a/EnvyUpdate/InfoWindow.xaml b/EnvyUpdate/InfoWindow.xaml index 6673c08..f52df60 100644 --- a/EnvyUpdate/InfoWindow.xaml +++ b/EnvyUpdate/InfoWindow.xaml @@ -11,6 +11,6 @@