Fix URI protocols not unregistering on uninstall

This commit is contained in:
pizzaboxer 2023-01-09 18:48:37 +00:00
parent 62ba5c83aa
commit 7a858ca08f
2 changed files with 8 additions and 4 deletions

View File

@ -441,7 +441,7 @@ namespace Bloxstrap
}
catch (Exception) { }
Dialog.ShowSuccess($"{Program.ProjectName} has been uninstalled");
Dialog.ShowSuccess($"{Program.ProjectName} has succesfully uninstalled");
Program.Exit();
}

View File

@ -1,4 +1,5 @@
using System.Text;
using System.Diagnostics;
using System.Text;
using System.Web;
using Microsoft.Win32;
@ -97,9 +98,12 @@ namespace Bloxstrap.Helpers
{
try
{
Registry.CurrentUser.DeleteSubKey($@"Software\Classes\{key}");
Registry.CurrentUser.DeleteSubKeyTree($@"Software\Classes\{key}");
}
catch (Exception e)
{
Debug.WriteLine($"Failed to unregister {key}: {e}");
}
catch (Exception) { }
}
}
}