From 590c079a28230859b0e81a88a263b656bf4411b5 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Tue, 15 Oct 2024 10:23:26 +0500 Subject: [PATCH] Installer: Remove Windows Explorer integration for current user --- deploy/FortFirewall.iss | 1 + src/ui/fortmanager.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/deploy/FortFirewall.iss b/deploy/FortFirewall.iss index 289896ce..30890324 100644 --- a/deploy/FortFirewall.iss +++ b/deploy/FortFirewall.iss @@ -89,6 +89,7 @@ Name: "{commondesktop}\{#APP_NAME}"; Filename: "{#APP_EXE}"; WorkingDir: "{app}" [Run] ; 1. Uninstall -> 2. Install Driver -> 3. Portable -> 4. Service +Filename: "{#APP_EXE}"; Parameters: "-u explorer"; Flags: runasoriginaluser Filename: "{#APP_EXE}"; Parameters: "-u most" Filename: "{app}\driver\scripts\reinstall.bat"; Parameters: {code:DriverInstallArgs}; \ diff --git a/src/ui/fortmanager.cpp b/src/ui/fortmanager.cpp index 6344a606..249773ca 100644 --- a/src/ui/fortmanager.cpp +++ b/src/ui/fortmanager.cpp @@ -281,15 +281,17 @@ void FortManager::install(const char *arg) void FortManager::uninstall(const char *arg) { + StartupUtil::setExplorerIntegrated(false); // Remove Windows Explorer integration + if (arg && *arg == 'e') // "explorer" + return; + // COMPAT: Remove Global Windows Explorer integration StartupUtil::clearGlobalExplorerIntegrated(); - StartupUtil::setExplorerIntegrated(false); // Remove Windows Explorer integration - StartupUtil::stopService(ServiceControlStopUninstall); // Quit clients & Stop service StartupUtil::setServiceInstalled(false); // Uninstall service - if (!arg) { + if (!arg) { // !"most" StartupUtil::setAutoRunMode(StartupUtil::StartupDisabled); // Remove auto-run DriverCommon::provUnregister(); // Unregister booted provider