Skip to content

Commit

Permalink
Fix the "Uninstall BCUninstaller" menu option not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Klocman committed May 15, 2023
1 parent 4e610e6 commit 2b90f32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions source/BulkCrapUninstaller/Functions/AppUninstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion source/BulkCrapUninstaller/Functions/MessageBoxes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 2b90f32

Please sign in to comment.