mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
fix still installed check
This commit is contained in:
parent
2c1c2a374f
commit
e70dc6df49
@ -677,13 +677,14 @@ namespace Bloxstrap
|
|||||||
SetStatus($"Uninstalling {App.ProjectName}...");
|
SetStatus($"Uninstalling {App.ProjectName}...");
|
||||||
|
|
||||||
App.ShouldSaveConfigs = false;
|
App.ShouldSaveConfigs = false;
|
||||||
bool robloxStillInstalled = true;
|
bool robloxPlayerStillInstalled = true;
|
||||||
|
bool robloxStudioStillInstalled = true;
|
||||||
|
|
||||||
// check if stock bootstrapper is still installed
|
// check if stock bootstrapper is still installed
|
||||||
using RegistryKey? bootstrapperKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Uninstall\roblox-player");
|
using RegistryKey? bootstrapperKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Uninstall\roblox-player");
|
||||||
if (bootstrapperKey is null)
|
if (bootstrapperKey is null)
|
||||||
{
|
{
|
||||||
robloxStillInstalled = false;
|
robloxPlayerStillInstalled = false;
|
||||||
|
|
||||||
ProtocolHandler.Unregister("roblox");
|
ProtocolHandler.Unregister("roblox");
|
||||||
ProtocolHandler.Unregister("roblox-player");
|
ProtocolHandler.Unregister("roblox-player");
|
||||||
@ -701,15 +702,13 @@ namespace Bloxstrap
|
|||||||
using RegistryKey? studioBootstrapperKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Uninstall\roblox-studio");
|
using RegistryKey? studioBootstrapperKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Uninstall\roblox-studio");
|
||||||
if (studioBootstrapperKey is null)
|
if (studioBootstrapperKey is null)
|
||||||
{
|
{
|
||||||
robloxStillInstalled = false;
|
robloxStudioStillInstalled = false;
|
||||||
|
|
||||||
ProtocolHandler.Unregister("roblox-studio");
|
ProtocolHandler.Unregister("roblox-studio");
|
||||||
ProtocolHandler.Unregister("roblox-studio-auth");
|
ProtocolHandler.Unregister("roblox-studio-auth");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
robloxStillInstalled = true;
|
|
||||||
|
|
||||||
string studioLocation = (string?)studioBootstrapperKey.GetValue("InstallLocation") + "RobloxStudioBeta.exe"; // points to studio exe instead of bootstrapper
|
string studioLocation = (string?)studioBootstrapperKey.GetValue("InstallLocation") + "RobloxStudioBeta.exe"; // points to studio exe instead of bootstrapper
|
||||||
ProtocolHandler.Register("roblox-studio", "Roblox", studioLocation);
|
ProtocolHandler.Register("roblox-studio", "Roblox", studioLocation);
|
||||||
ProtocolHandler.Register("roblox-studio-auth", "Roblox", studioLocation);
|
ProtocolHandler.Register("roblox-studio-auth", "Roblox", studioLocation);
|
||||||
@ -745,7 +744,7 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
string robloxFolder = Path.Combine(Paths.LocalAppData, "Roblox");
|
string robloxFolder = Path.Combine(Paths.LocalAppData, "Roblox");
|
||||||
|
|
||||||
if (!robloxStillInstalled && Directory.Exists(robloxFolder))
|
if (!robloxPlayerStillInstalled && !robloxStudioStillInstalled && Directory.Exists(robloxFolder))
|
||||||
cleanupSequence.Add(() => Directory.Delete(robloxFolder, true));
|
cleanupSequence.Add(() => Directory.Delete(robloxFolder, true));
|
||||||
|
|
||||||
foreach (var process in cleanupSequence)
|
foreach (var process in cleanupSequence)
|
||||||
|
Loading…
Reference in New Issue
Block a user