Bug 806814. r=rstrong,a=Standard8
authorMark Banner <bugzilla@standard8.plus.com>
Tue, 09 Apr 2013 20:44:55 +0100
changeset 13676 9c12a1bd96923ae78ad1d1ada8f0475fbd06728a
parent 13675 19d808bd643ae043dace06e1edd915149619537b
child 13677 506abd6aa42d3b3f7b05f0065b1f06c8ff0b74fa
push id913
push userbugzilla@standard8.plus.com
push dateSun, 14 Apr 2013 15:40:24 +0000
treeherdercomm-aurora@506abd6aa42d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong, Standard8
bugs806814
Bug 806814. r=rstrong,a=Standard8
mail/installer/windows/nsis/installer.nsi
mail/installer/windows/nsis/maintenanceservice_installer.nsi
mail/installer/windows/nsis/uninstaller.nsi
--- a/mail/installer/windows/nsis/installer.nsi
+++ b/mail/installer/windows/nsis/installer.nsi
@@ -940,16 +940,20 @@ Function preFinish
   ${EndInstallLog} "${BrandFullName}"
   !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "cancelenabled" "0"
 FunctionEnd
 
 ################################################################################
 # Initialization Functions
 
 Function .onInit
+  ; Remove the current exe directory from the search order.
+  ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
+  System::Call 'kernel32::SetDllDirectoryW(w "")'
+
   StrCpy $PageName ""
   StrCpy $LANGUAGE 0
   ${SetBrandNameVars} "$EXEDIR\core\distribution\setup.ini"
 
   ${InstallOnInitCommon} "$(WARN_MIN_SUPPORTED_OS_MSG)"
 
   !insertmacro InitInstallOptionsFile "options.ini"
   !insertmacro InitInstallOptionsFile "shortcuts.ini"
--- a/mail/installer/windows/nsis/maintenanceservice_installer.nsi
+++ b/mail/installer/windows/nsis/maintenanceservice_installer.nsi
@@ -101,16 +101,20 @@ ShowUnInstDetails nevershow
 !include "customLocale.nsh"
 !verbose pop
 
 ; Set this after the locale files to override it if it is in the locale
 ; using " " for BrandingText will hide the "Nullsoft Install System..." branding
 BrandingText " "
 
 Function .onInit
+  ; Remove the current exe directory from the search order.
+  ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
+  System::Call 'kernel32::SetDllDirectoryW(w "")'
+
   SetSilent silent
 !ifdef HAVE_64BIT_OS
   ; We plan to eventually enable 64bit native builds to use the maintenance
   ; service, but for the initial release, to reduce testing and development,
   ; 64-bit builds will not install the maintenanceservice.
   Abort
 !endif
 
@@ -118,16 +122,20 @@ Function .onInit
   ; We won't run this installer from the parent installer, but just in case 
   ; someone tries to execute it on Windows 2000...
   ${Unless} ${AtLeastWinXP}
     Abort
   ${EndUnless}
 FunctionEnd
 
 Function un.onInit
+  ; Remove the current exe directory from the search order.
+  ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
+  System::Call 'kernel32::SetDllDirectoryW(w "")'
+
   StrCpy $BrandFullNameDA "${MaintFullName}"
   StrCpy $BrandFullName "${MaintFullName}"
 FunctionEnd
 
 Section "MaintenanceService"
   AllowSkipFiles off
 
   CreateDirectory $INSTDIR
--- a/mail/installer/windows/nsis/uninstaller.nsi
+++ b/mail/installer/windows/nsis/uninstaller.nsi
@@ -505,24 +505,32 @@ Function un.preFinish
   ${EndUnless}
 FunctionEnd
 !endif
 
 ################################################################################
 # Initialization Functions
 
 Function .onInit
+  ; Remove the current exe directory from the search order.
+  ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
+  System::Call 'kernel32::SetDllDirectoryW(w "")'
+
   ; We need this set up for most of the helper.exe operations.
   !ifdef AppName
   ${InitHashAppModelId} "$INSTDIR" "Software\Mozilla\${AppName}\TaskBarIDs"
   !endif
   ${UninstallOnInitCommon}
 FunctionEnd
 
 Function un.onInit
+  ; Remove the current exe directory from the search order.
+  ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
+  System::Call 'kernel32::SetDllDirectoryW(w "")'
+
   StrCpy $LANGUAGE 0
 
   ${un.UninstallUnOnInitCommon}
 
   !insertmacro InitInstallOptionsFile "unconfirm.ini"
 FunctionEnd
 
 Function .onGUIEnd