From e40142847b0b66182904eea9c61c8483c6b59f96 Mon Sep 17 00:00:00 2001 From: alex-z Date: Wed, 18 May 2022 14:56:04 +0300 Subject: [PATCH] Add and use DO_NOT_REBOOT_IN_SILENT=1 parameter for MSI to not reboot automatically when running from the updater. Signed-off-by: alex-z --- admin/win/msi/Nextcloud.wxs | 2 +- src/gui/updater/ocupdater.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/win/msi/Nextcloud.wxs b/admin/win/msi/Nextcloud.wxs index 8e694b3f6..d11124517 100644 --- a/admin/win/msi/Nextcloud.wxs +++ b/admin/win/msi/Nextcloud.wxs @@ -81,7 +81,7 @@ (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL") - (SCHEDULE_REBOOT=1) OR NOT (UILevel=2) + (SCHEDULE_REBOOT=1) OR (NOT (UILevel=2) AND NOT (DO_NOT_REBOOT_IN_SILENT=1)) diff --git a/src/gui/updater/ocupdater.cpp b/src/gui/updater/ocupdater.cpp index aecc66c90..ec0f65547 100644 --- a/src/gui/updater/ocupdater.cpp +++ b/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' /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())); -- 2.39.5