From fd335c8c32041e9b14f21d31f09497eab16791b3 Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Tue, 17 Jun 2014 22:44:54 -0400 Subject: [PATCH] Bug 775458 - Microsoft Security Essentials causes slow update fix. r=rstrong --- .../installer/windows/nsis/maintenanceservice_installer.nsi | 6 +++--- .../components/maintenanceservice/maintenanceservice.cpp | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/browser/installer/windows/nsis/maintenanceservice_installer.nsi b/browser/installer/windows/nsis/maintenanceservice_installer.nsi index 5745edd9ed7c..92e43f12de57 100644 --- a/browser/installer/windows/nsis/maintenanceservice_installer.nsi +++ b/browser/installer/windows/nsis/maintenanceservice_installer.nsi @@ -190,11 +190,11 @@ Section "MaintenanceService" ${GetParameters} $0 ${GetOptions} "$0" "/Upgrade" $0 ${If} ${Errors} - nsExec::Exec '"$INSTDIR\$TempMaintServiceName" install' + ExecWait '"$INSTDIR\$TempMaintServiceName" install' ${Else} ; The upgrade cmdline is the same as install except ; It will fail if the service isn't already installed. - nsExec::Exec '"$INSTDIR\$TempMaintServiceName" upgrade' + ExecWait '"$INSTDIR\$TempMaintServiceName" upgrade' ${EndIf} WriteUninstaller "$INSTDIR\Uninstall.exe" @@ -255,7 +255,7 @@ FunctionEnd Section "Uninstall" ; Delete the service so that no updates will be attempted - nsExec::Exec '"$INSTDIR\maintenanceservice.exe" uninstall' + ExecWait '"$INSTDIR\maintenanceservice.exe" uninstall' Push "$INSTDIR\updater.ini" Call un.RenameDelete diff --git a/toolkit/components/maintenanceservice/maintenanceservice.cpp b/toolkit/components/maintenanceservice/maintenanceservice.cpp index fd591559a41f..2e453af6998d 100644 --- a/toolkit/components/maintenanceservice/maintenanceservice.cpp +++ b/toolkit/components/maintenanceservice/maintenanceservice.cpp @@ -15,6 +15,10 @@ #include "uachelper.h" #include "updatehelper.h" +// Link w/ subsystem window so we don't get a console when executing +// this binary through the installer. +#pragma comment(linker, "/SUBSYSTEM:windows") + SERVICE_STATUS gSvcStatus = { 0 }; SERVICE_STATUS_HANDLE gSvcStatusHandle = nullptr; HANDLE gWorkDoneEvent = nullptr;