From 2b90f32d81aabcb89dab2e6c3b991464d0a35790 Mon Sep 17 00:00:00 2001 From: Marcin Szeniak <14913904+Klocman@users.noreply.github.com> Date: Mon, 15 May 2023 23:34:43 +0200 Subject: [PATCH] Fix the "Uninstall BCUninstaller" menu option not working --- source/BulkCrapUninstaller/Functions/AppUninstaller.cs | 8 ++++++-- source/BulkCrapUninstaller/Functions/MessageBoxes.cs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/BulkCrapUninstaller/Functions/AppUninstaller.cs b/source/BulkCrapUninstaller/Functions/AppUninstaller.cs index 62f67d6b..183f58c4 100644 --- a/source/BulkCrapUninstaller/Functions/AppUninstaller.cs +++ b/source/BulkCrapUninstaller/Functions/AppUninstaller.cs @@ -606,8 +606,12 @@ internal void AskToSelfUninstall() try { - Process.Start("unins000.exe"); - Environment.Exit(0); + var fullPath = MessageBoxes.GetBundledFilePath("unins000.exe"); + if (fullPath != null) + { + Process.Start(fullPath); + Environment.Exit(0); + } } catch (Exception ex) { diff --git a/source/BulkCrapUninstaller/Functions/MessageBoxes.cs b/source/BulkCrapUninstaller/Functions/MessageBoxes.cs index 14af0cce..7a6d865e 100644 --- a/source/BulkCrapUninstaller/Functions/MessageBoxes.cs +++ b/source/BulkCrapUninstaller/Functions/MessageBoxes.cs @@ -620,7 +620,7 @@ public static void DisplayPrivacyPolicy() if (path != null) PremadeDialogs.StartProcessSafely(path); } - private static string GetBundledFilePath(string filename) + public static string GetBundledFilePath(string filename) { var path = Path.Combine(Program.AssemblyLocation.FullName, filename); if (!File.Exists(path))