From bca6e3d21be7b70f71e27329ff4a1295ced6738b Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Mon, 31 Jul 2023 12:59:35 +0100 Subject: [PATCH] Cleanup Roblox folder on uninstallation --- Bloxstrap/Bootstrapper.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index 3109584..ce8f537 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -670,6 +670,7 @@ namespace Bloxstrap SetStatus($"Uninstalling {App.ProjectName}..."); App.ShouldSaveConfigs = false; + bool robloxStillInstalled = true; // check if stock bootstrapper is still installed RegistryKey? bootstrapperKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Uninstall\roblox-player"); @@ -677,6 +678,8 @@ namespace Bloxstrap { ProtocolHandler.Unregister("roblox"); ProtocolHandler.Unregister("roblox-player"); + + robloxStillInstalled = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Uninstall\roblox-studio") is not null; } else { @@ -716,6 +719,11 @@ namespace Bloxstrap cleanupSequence.Add(() => Directory.Delete(Paths.Base, true)); } + string robloxFolder = Path.Combine(Paths.LocalAppData, "Roblox"); + + if (!robloxStillInstalled && Directory.Exists(robloxFolder)) + cleanupSequence.Add(() => Directory.Delete(robloxFolder, true)); + foreach (var process in cleanupSequence) { try