Do not reboot PC when running an MSI via autoupdate.
authorallexzander <blackslayer4@gmail.com>
Mon, 1 Aug 2022 18:53:27 +0000 (21:53 +0300)
committeralex-z <blackslayer4@gmail.com>
Tue, 2 Aug 2022 06:26:17 +0000 (09:26 +0300)
Signed-off-by: allexzander <blackslayer4@gmail.com>
admin/win/msi/Nextcloud.wxs
src/gui/updater/ocupdater.cpp

index d111245174d896ddbcd631a7dbfaa2f359a5d5af..8e694b3f69a515168d4565b67f0c753cecf5c3ab 100644 (file)
@@ -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 -->
index ec0f65547ce9fd591dce9cfb1eb39243c022c288..102c7fcbbedddef4a5c88ce29ac50c4e3f25cec7 100644 (file)
@@ -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()));