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

Add and use DO_NOT_REBOOT_IN_SILENT=1 parameter for MSI to not reboot during the auto-update.
This commit is contained in:
allexzander 2022-05-19 12:52:51 +03:00 committed by GitHub
commit 5523330d65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View 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)</ScheduleReboot>
<ScheduleReboot After="InstallFinalize">(SCHEDULE_REBOOT=1) OR (NOT (UILevel=2) AND NOT (DO_NOT_REBOOT_IN_SILENT=1))</ScheduleReboot>
</InstallExecuteSequence>
<!-- "Add or Remove" Programs Entries -->

View File

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