Explorar el Código

Temporarily not updating drag&drop shell extension for minor changes when installing for current user (related to Issue 2381)

https://winscp.net/tracker/2381

This change won't be merged to dev, where it is superseded by 3e257a05.

Source commit: 50dbd1673154e75fca2537160018c2641e19e28e
Martin Prikryl hace 3 meses
padre
commit
1d81541b47
Se han modificado 1 ficheros con 12 adiciones y 3 borrados
  1. 12 3
      deployment/winscpsetup.iss

+ 12 - 3
deployment/winscpsetup.iss

@@ -497,9 +497,18 @@ begin
     if (InstalledMinor > ExistingMinor) or
        ((InstalledMinor = ExistingMinor) and (InstalledRev > ExistingRev)) then
     begin
-      Log('Installed extension is newer than existing extension, but major version is the same, allowing installation, but we will delay replacing the extension until the next system start, if it is locked.');
-      Result := True;
-      ShellExtNoRestart := True;
+      if IsAdminInstallMode then
+      begin
+        Log('Installed extension is newer than existing extension, but major version is the same, allowing installation, but we will delay replacing the extension until the next system start, if it is locked.');
+        Result := True;
+        ShellExtNoRestart := True;
+      end
+        else
+      begin
+        Log('Installed extension is newer than existing extension, but major version is the same, and installer does not have administrator privileges, so delayed replacement is not possible, skipping installation (extension will be upgraded only with the next major release)');
+        ShellExtNoRestart := False;
+        Result := False;
+      end;
     end
       else
     begin