UI: Remove Global Windows Explorer integration on Uninstall

This commit is contained in:
Nodir Temirkhodjaev 2023-12-31 13:31:16 +03:00
parent d41332f991
commit 1cd580fcd2
3 changed files with 11 additions and 0 deletions

View File

@ -245,6 +245,8 @@ void FortManager::uninstall()
StartupUtil::setAutoRunMode(StartupUtil::StartupDisabled); // Remove auto-run
StartupUtil::setServiceInstalled(false); // Uninstall service
StartupUtil::setExplorerIntegrated(false); // Remove Windows Explorer integration
StartupUtil::clearGlobalExplorerIntegrated(); // COMPAT: Remove Global Windows Explorer
// integration
DriverCommon::provUnregister(); // Unregister booted provider
}

View File

@ -298,6 +298,13 @@ void StartupUtil::setExplorerIntegrated(bool integrate)
}
}
void StartupUtil::clearGlobalExplorerIntegrated()
{
RegKey regShell(RegKey::HKLM, regShellMenu, RegKey::DefaultReadWrite);
regShell.removeRecursively(APP_NAME);
}
QString StartupUtil::registryPasswordHash()
{
const RegKey regApp(RegKey::HKLM, R"(SOFTWARE)");

View File

@ -22,6 +22,8 @@ public:
static bool isExplorerIntegrated();
static void setExplorerIntegrated(bool integrate);
static void clearGlobalExplorerIntegrated();
static QString registryPasswordHash();
static void setRegistryPasswordHash(const QString &passwordHash);