Bug 806814. r=rstrong,a=Standard8
authorMark Banner <bugzilla@standard8.plus.com>
Tue, 09 Apr 2013 20:44:55 +0100
changeset 13662 f1a6816eb13a5a5731d61c1baedc35900a21a8dc
parent 13661 91dfd2763ee079cd841695d238c6cb530761a2f2
child 13663 1834c9586d8fd23cea86295013c25ffdc228ddf7
push id52
push userbugzilla@standard8.plus.com
push dateWed, 01 May 2013 10:20:30 +0000
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