From 56ff98d5b4ab4355ec8836e88be296e3e3d0b940 Mon Sep 17 00:00:00 2001 From: Jakob Date: Tue, 11 Aug 2020 10:27:05 +0200 Subject: [PATCH 001/148] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5d88c88..14fa1a6 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ ![Issues](https://img.shields.io/github/issues/fyr77/envyupdate?style=for-the-badge) ![Version](https://img.shields.io/github/v/release/fyr77/envyupdate?style=for-the-badge) +Be sure to also check [ElPumpo's TinyNvidiaUpdateChecker](https://github.com/ElPumpo/TinyNvidiaUpdateChecker). It's the project that inspired EnvyUpdate in the first place. + ## How to use ### 2.0 and later From 1ecc0ef10406ef500a44b2fef7487d5ec2d4fe39 Mon Sep 17 00:00:00 2001 From: Jakob Date: Tue, 11 Aug 2020 10:28:30 +0200 Subject: [PATCH 002/148] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 14fa1a6..4eaece4 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ ![Version](https://img.shields.io/github/v/release/fyr77/envyupdate?style=for-the-badge) Be sure to also check [ElPumpo's TinyNvidiaUpdateChecker](https://github.com/ElPumpo/TinyNvidiaUpdateChecker). It's the project that inspired EnvyUpdate in the first place. +There's also [Disable-Nvidia-Telemtry](https://github.com/NateShoffner/Disable-Nvidia-Telemetry), which does a really cool things I have not (yet) implemented. ## How to use From 9d70fa3ea3284820d6e40375c30943484948a88c Mon Sep 17 00:00:00 2001 From: Jakob Date: Tue, 11 Aug 2020 10:28:45 +0200 Subject: [PATCH 003/148] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4eaece4..c2efca5 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ ![Version](https://img.shields.io/github/v/release/fyr77/envyupdate?style=for-the-badge) Be sure to also check [ElPumpo's TinyNvidiaUpdateChecker](https://github.com/ElPumpo/TinyNvidiaUpdateChecker). It's the project that inspired EnvyUpdate in the first place. + There's also [Disable-Nvidia-Telemtry](https://github.com/NateShoffner/Disable-Nvidia-Telemetry), which does a really cool things I have not (yet) implemented. ## How to use From 7ea4d65def5295ef86a1443414333c2b119370ed Mon Sep 17 00:00:00 2001 From: fyr77 Date: Tue, 11 Aug 2020 11:39:32 +0200 Subject: [PATCH 004/148] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2efca5..01342f1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Be sure to also check [ElPumpo's TinyNvidiaUpdateChecker](https://github.com/ElPumpo/TinyNvidiaUpdateChecker). It's the project that inspired EnvyUpdate in the first place. -There's also [Disable-Nvidia-Telemtry](https://github.com/NateShoffner/Disable-Nvidia-Telemetry), which does a really cool things I have not (yet) implemented. +There's also [Disable-Nvidia-Telemtry](https://github.com/NateShoffner/Disable-Nvidia-Telemetry), which does some really cool things I have not (yet) implemented. ## How to use From 386fabcbbb5b89b5335ef3fa4a4df71332881a7d Mon Sep 17 00:00:00 2001 From: fyr77 Date: Fri, 14 Aug 2020 10:05:38 +0200 Subject: [PATCH 005/148] Update README.md --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 01342f1..9784991 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,6 @@ ![Issues](https://img.shields.io/github/issues/fyr77/envyupdate?style=for-the-badge) ![Version](https://img.shields.io/github/v/release/fyr77/envyupdate?style=for-the-badge) -Be sure to also check [ElPumpo's TinyNvidiaUpdateChecker](https://github.com/ElPumpo/TinyNvidiaUpdateChecker). It's the project that inspired EnvyUpdate in the first place. - -There's also [Disable-Nvidia-Telemtry](https://github.com/NateShoffner/Disable-Nvidia-Telemetry), which does some really cool things I have not (yet) implemented. - ## How to use ### 2.0 and later @@ -43,6 +39,14 @@ Simply download the latest release from the [releases page](https://github.com/f The application is compatible with all Nvidia GPUs that have their drivers available on the nvidia.com download page and runs on Windows 7 and up. +## Other interesting tools + +* [TinyNvidiaUpdateChecker](https://github.com/ElPumpo/TinyNvidiaUpdateChecker) - a command line update checker and installer. Inspired EnvyUpdate to begin with. +* [Disable-Nvidia-Telemtry](https://github.com/NateShoffner/Disable-Nvidia-Telemetry) - does pretty much what the name says. It disables Nvidia Telemetry. +* [NVCleanInstall](https://www.techpowerup.com/nvcleanstall/) - a closed-source application by TechPowerUp which does quite a lot of cool things. + +EnvyUpdate is not a replacement for any of these tools. I will still try to implement as many features in EnvyUpdate as possible while keeping the simple interface and as little settings as possible. + ## Licenses * This project: [MIT](https://github.com/fyr77/EnvyUpdate/blob/master/LICENSE) From 611a6568d6052ef7c099d04c6d06d1feaa9a0363 Mon Sep 17 00:00:00 2001 From: fyr77 Date: Mon, 17 Aug 2020 11:14:59 +0200 Subject: [PATCH 006/148] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 9784991..70f5308 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,14 @@ Simply download the latest release from the [releases page](https://github.com/f The application is compatible with all Nvidia GPUs that have their drivers available on the nvidia.com download page and runs on Windows 7 and up. +## Development + +This application is currently maintained and developed by me (fyr77) alone in my free time. + +I always try to implement critical fixes as fast as I can, but other features and minor bug fixes may take a few days to weeks to implement. + +If you want to help me develop EnvyUpdate, you can start by creating issues with your bug reports and/or feature requests. Pull requests are also welcome, especially regarding translations. + ## Other interesting tools * [TinyNvidiaUpdateChecker](https://github.com/ElPumpo/TinyNvidiaUpdateChecker) - a command line update checker and installer. Inspired EnvyUpdate to begin with. From b99a2ee8c94eb7021d4aaf368d7157e2aa4ddada Mon Sep 17 00:00:00 2001 From: fyr77 Date: Mon, 17 Aug 2020 11:15:45 +0200 Subject: [PATCH 007/148] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70f5308..0c4e180 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ The application is compatible with all Nvidia GPUs that have their drivers avail This application is currently maintained and developed by me (fyr77) alone in my free time. -I always try to implement critical fixes as fast as I can, but other features and minor bug fixes may take a few days to weeks to implement. +I always try to implement critical fixes as fast as I can, but other features and minor bug fixes may take a few days or weeks to implement. If you want to help me develop EnvyUpdate, you can start by creating issues with your bug reports and/or feature requests. Pull requests are also welcome, especially regarding translations. From fff0d76b83fdbc247433031c537a797f1a53539e Mon Sep 17 00:00:00 2001 From: fyr77 Date: Tue, 18 Aug 2020 15:19:38 +0200 Subject: [PATCH 008/148] change version comparisons it is now possible to locally use newer application or driver versions without envyupdate yelling at you. --- EnvyUpdate/GlobalVars.cs | 2 +- EnvyUpdate/MainWindow.xaml.cs | 4 ++-- EnvyUpdate/Util.cs | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/EnvyUpdate/GlobalVars.cs b/EnvyUpdate/GlobalVars.cs index ac8de7f..402384c 100644 --- a/EnvyUpdate/GlobalVars.cs +++ b/EnvyUpdate/GlobalVars.cs @@ -9,7 +9,7 @@ namespace EnvyUpdate public static readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location; public static readonly string exepath = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\"; public static readonly string startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu); - public static readonly string version = "2.2"; + public static readonly float version = 2.3F; public static readonly string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\"; public static readonly string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup); public static readonly string desktopOverride = exepath + "desktop.envy"; diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs index ae45cde..fc7fb9c 100644 --- a/EnvyUpdate/MainWindow.xaml.cs +++ b/EnvyUpdate/MainWindow.xaml.cs @@ -51,7 +51,7 @@ namespace EnvyUpdate { try { - if (Util.GetNewVer() != GlobalVars.version) + if (Util.GetNewVer() > GlobalVars.version) { Util.UpdateApp(); } @@ -142,7 +142,7 @@ namespace EnvyUpdate textblockOnline.Text = onlineDriv; c.Dispose(); - if (localDriv != onlineDriv) + if (float.Parse(localDriv) < float.Parse(onlineDriv)) { textblockOnline.Foreground = Brushes.Red; buttonDL.Visibility = Visibility.Visible; diff --git a/EnvyUpdate/Util.cs b/EnvyUpdate/Util.cs index b60c006..6f2be10 100644 --- a/EnvyUpdate/Util.cs +++ b/EnvyUpdate/Util.cs @@ -103,7 +103,7 @@ namespace EnvyUpdate /// Checks for newest EnvyUpdate version. /// /// - public static string GetNewVer() + public static float GetNewVer() { // This will fetch the most recent version's tag on GitHub. string updPath = "https://api.github.com/repos/fyr77/envyupdate/releases/latest"; @@ -113,7 +113,10 @@ namespace EnvyUpdate wc.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko"); string webData = wc.DownloadString(updPath); dynamic data = JsonConvert.DeserializeObject(webData); - string version = data.tag_name; + + // I am not catching a possible parsing exception, because I cannot think of any way it could happen. + // If there is no internet connection, it should already throw when using the web client. + float version = float.Parse(data.tag_name); return version; } From 3c4dc9da2b9afc8f298d8bf785aa232cda14de79 Mon Sep 17 00:00:00 2001 From: fyr77 Date: Tue, 18 Aug 2020 15:37:34 +0200 Subject: [PATCH 009/148] Update AssemblyInfo to reflect actual version --- EnvyUpdate/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EnvyUpdate/Properties/AssemblyInfo.cs b/EnvyUpdate/Properties/AssemblyInfo.cs index 1399985..ce694c2 100644 --- a/EnvyUpdate/Properties/AssemblyInfo.cs +++ b/EnvyUpdate/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.3")] +[assembly: AssemblyFileVersion("2.3")] From 4e58a588f12565c171320236e66903d89fe8eb38 Mon Sep 17 00:00:00 2001 From: fyr77 Date: Wed, 19 Aug 2020 19:35:21 +0200 Subject: [PATCH 010/148] add IsDCH function --- EnvyUpdate/Util.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/EnvyUpdate/Util.cs b/EnvyUpdate/Util.cs index 6f2be10..015b6fd 100644 --- a/EnvyUpdate/Util.cs +++ b/EnvyUpdate/Util.cs @@ -11,6 +11,7 @@ using System.Xml; using System.Xml.Linq; using System.Text.RegularExpressions; using System.Runtime.InteropServices; +using Microsoft.Win32; namespace EnvyUpdate { @@ -368,5 +369,10 @@ namespace EnvyUpdate return result; } + public static bool IsDCH() + { + RegistryKey nvlddmkm = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\services\nvlddmkm", true); + return nvlddmkm.GetValueNames().Contains("DCHUVen"); + } } } \ No newline at end of file From 58631d5d8a30d82f5b75241bfdd6a39b549da7dc Mon Sep 17 00:00:00 2001 From: fyr77 Date: Thu, 3 Sep 2020 22:24:22 +0200 Subject: [PATCH 011/148] fix potential memory leak --- EnvyUpdate/Util.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/EnvyUpdate/Util.cs b/EnvyUpdate/Util.cs index 015b6fd..2d0cdfc 100644 --- a/EnvyUpdate/Util.cs +++ b/EnvyUpdate/Util.cs @@ -108,12 +108,15 @@ namespace EnvyUpdate { // This will fetch the most recent version's tag on GitHub. string updPath = "https://api.github.com/repos/fyr77/envyupdate/releases/latest"; + dynamic data = null; - WebClient wc = new WebClient(); - // Use some user agent to not get 403'd by GitHub. - wc.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko"); - string webData = wc.DownloadString(updPath); - dynamic data = JsonConvert.DeserializeObject(webData); + using (var wc = new WebClient()) + { + // Use some user agent to not get 403'd by GitHub. + wc.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko"); + string webData = wc.DownloadString(updPath); + data = JsonConvert.DeserializeObject(webData); + } // I am not catching a possible parsing exception, because I cannot think of any way it could happen. // If there is no internet connection, it should already throw when using the web client. From a42641fdcef695554b2ae70546665a3e552fe2c0 Mon Sep 17 00:00:00 2001 From: fyr77 Date: Sun, 6 Sep 2020 11:03:04 +0200 Subject: [PATCH 012/148] add DCH compat, better debug --- EnvyUpdate/Debug.cs | 49 ++++++++++++ EnvyUpdate/EnvyUpdate.csproj | 1 + EnvyUpdate/GlobalVars.cs | 2 +- EnvyUpdate/InfoWindow.xaml | 22 +++--- EnvyUpdate/InfoWindow.xaml.cs | 5 +- EnvyUpdate/MainWindow.xaml | 2 +- EnvyUpdate/MainWindow.xaml.cs | 82 ++++++++++++--------- EnvyUpdate/Properties/AssemblyInfo.cs | 4 +- EnvyUpdate/Properties/Resources.Designer.cs | 9 +++ EnvyUpdate/Properties/Resources.de.resx | 3 + EnvyUpdate/Properties/Resources.resx | 3 + EnvyUpdate/Util.cs | 29 +++++++- 12 files changed, 157 insertions(+), 54 deletions(-) create mode 100644 EnvyUpdate/Debug.cs diff --git a/EnvyUpdate/Debug.cs b/EnvyUpdate/Debug.cs new file mode 100644 index 0000000..3b4d7f0 --- /dev/null +++ b/EnvyUpdate/Debug.cs @@ -0,0 +1,49 @@ +using System; +using System.Linq; + +namespace EnvyUpdate +{ + class Debug + { + readonly static string debugFilePath = GlobalVars.exepath + "debug.txt"; + public static int LoadFakeIDs(string idType) + { + /* + * Usage: + * Create debug.txt file. + * Fill in variables: + * Line 1: psid + * Line 2: pfid + * Line 3: osid + * Line 4: dtcid + * Line 5: Local driver version + * + * Supply /debug flag to exe. + */ + string line = null; + switch (idType) + { + case "psid": + line = File.ReadLines(debugFilePath).Take(1).First(); + break; + case "pfid": + line = File.ReadLines(debugFilePath).Skip(1).Take(1).First(); + break; + case "osid": + line = File.ReadLines(debugFilePath).Skip(2).Take(1).First(); + break; + case "dtcid": + line = File.ReadLines(debugFilePath).Skip(3).Take(1).First(); + break; + default: + break; + } + + return int.Parse(line); + } + public static string LocalDriv() + { + return File.ReadLines(debugFilePath).Skip(4).Take(1).First(); + } + } +} diff --git a/EnvyUpdate/EnvyUpdate.csproj b/EnvyUpdate/EnvyUpdate.csproj index edc0a08..4d0512f 100644 --- a/EnvyUpdate/EnvyUpdate.csproj +++ b/EnvyUpdate/EnvyUpdate.csproj @@ -95,6 +95,7 @@ MSBuild:Compile Designer + InfoWindow.xaml diff --git a/EnvyUpdate/GlobalVars.cs b/EnvyUpdate/GlobalVars.cs index 402384c..352f9cb 100644 --- a/EnvyUpdate/GlobalVars.cs +++ b/EnvyUpdate/GlobalVars.cs @@ -9,7 +9,7 @@ namespace EnvyUpdate public static readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location; public static readonly string exepath = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\"; public static readonly string startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu); - public static readonly float version = 2.3F; + public static readonly float version = 2.4F; public static readonly string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\"; public static readonly string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup); public static readonly string desktopOverride = exepath + "desktop.envy"; diff --git a/EnvyUpdate/InfoWindow.xaml b/EnvyUpdate/InfoWindow.xaml index 9987dc9..66d475f 100644 --- a/EnvyUpdate/InfoWindow.xaml +++ b/EnvyUpdate/InfoWindow.xaml @@ -6,19 +6,19 @@ xmlns:local="clr-namespace:EnvyUpdate" xmlns:p="clr-namespace:EnvyUpdate.Properties" mc:Ignorable="d" - Title="" Height="274" Width="286" ResizeMode="NoResize" WindowStyle="ToolWindow" SizeToContent="WidthAndHeight"> + Title="" Height="290" Width="286" ResizeMode="NoResize" WindowStyle="ToolWindow" SizeToContent="WidthAndHeight">