Parcourir la source

Merge pull request #4799 from nextcloud/bugfix/do-not-reboot-in-autoupdate

Do not reboot PC when running an MSI via autoupdate.
allexzander il y a 3 ans
Parent
commit
b37ca499b6
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      admin/win/msi/Nextcloud.wxs
  2. 1 1
      src/gui/updater/ocupdater.cpp

+ 1 - 1
admin/win/msi/Nextcloud.wxs

@@ -81,7 +81,7 @@
 		<Custom Action="RegistryCleanupCustomAction" After="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
 
         <!-- Schedule Reboot for the Shell Extensions (in silent installation mode only, or if SCHEDULE_REBOOT argument is set-->
-        <ScheduleReboot After="InstallFinalize">(SCHEDULE_REBOOT=1) OR (NOT (UILevel=2) AND NOT (DO_NOT_REBOOT_IN_SILENT=1))</ScheduleReboot>
+        <ScheduleReboot After="InstallFinalize">(SCHEDULE_REBOOT=1) OR NOT (UILevel=2)</ScheduleReboot>
     </InstallExecuteSequence>
 
     <!-- "Add or Remove" Programs Entries -->

+ 1 - 1
src/gui/updater/ocupdater.cpp

@@ -222,7 +222,7 @@ void OCUpdater::slotStartInstaller()
         };
 
         QString msiLogFile = cfg.configPath() + "msi.log";
-        QString command = QString("&{msiexec /promptrestart /passive /i '%1' DO_NOT_REBOOT_IN_SILENT=1 /L*V '%2'| Out-Null ; &'%3'}")
+        QString command = QString("&{msiexec /norestart /passive /i '%1' /L*V '%2'| Out-Null ; &'%3'}")
              .arg(preparePathForPowershell(updateFile))
              .arg(preparePathForPowershell(msiLogFile))
              .arg(preparePathForPowershell(QCoreApplication::applicationFilePath()));