Installer: Remove Windows Explorer integration for current user

This commit is contained in:
Nodir Temirkhodjaev 2024-10-15 10:23:26 +05:00
parent 6a0b6f0dc5
commit 590c079a28
2 changed files with 6 additions and 3 deletions

View File

@ -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}; \

View File

@ -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