From c930c7231c9e54747d33c55fb2ffb2048e12f438 Mon Sep 17 00:00:00 2001 From: Marcin Szeniak <14913904+Klocman@users.noreply.github.com> Date: Mon, 15 May 2023 21:12:59 +0200 Subject: [PATCH] Blacklist 7z.exe from executable search Should fix #463 --- .../Factory/InfoAdders/AppExecutablesSearcher.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/UninstallTools/Factory/InfoAdders/AppExecutablesSearcher.cs b/source/UninstallTools/Factory/InfoAdders/AppExecutablesSearcher.cs index 1f97ddd8..71aaca5e 100644 --- a/source/UninstallTools/Factory/InfoAdders/AppExecutablesSearcher.cs +++ b/source/UninstallTools/Factory/InfoAdders/AppExecutablesSearcher.cs @@ -114,6 +114,9 @@ internal static ScanDirectoryResult ScanDirectory(DirectoryInfo directory) if (results.Count == 0 && binSubdirs.Count == 0) otherSubdirs.AddRange(maybeSubdirs); + // 7-Zip console application. Sometimes causes bad display data if it's picked as the most likely executable. No effect on real 7-Zip entries. + results.RemoveAll(x => string.Equals(x.Name, "7z.exe", StringComparison.OrdinalIgnoreCase)); + return new ScanDirectoryResult(results, binSubdirs, otherSubdirs); }