Bug 804971 r=rstrong,a=Standard8
authorMark Banner <bugzilla@standard8.plus.com>
Wed, 24 Oct 2012 21:57:55 +0100
changeset 13507 18f28032dc592638620319ae93d92a4429a9bab8
parent 13506 97dd0c4aadee02c20f8b22ccfef66442d1bc5e83
child 13510 7927c8c018cf11197327a6d74cbfdbcdab14b624
push idunknown
push userunknown
push dateunknown
reviewersrstrong, Standard8
bugs804971
Bug 804971 r=rstrong,a=Standard8
mail/installer/windows/nsis/installer.nsi
mail/installer/windows/nsis/shared.nsh
--- a/mail/installer/windows/nsis/installer.nsi
+++ b/mail/installer/windows/nsis/installer.nsi
@@ -385,17 +385,17 @@ Section "-Application" APP_IDX
     ${EndIf}
   ${EndIf}
 
   ${If} $InstallMaintenanceService == "1"
     ; The user wants to install the maintenance service, so execute
     ; the pre-packaged maintenance service installer. 
     ; This option can only be turned on if the user is an admin so there
     ; is no need to use ExecShell w/ verb runas to enforce elevated.
-    nsExec::Exec "$INSTDIR\maintenanceservice_installer.exe" 
+    nsExec::Exec "$\"$INSTDIR\maintenanceservice_installer.exe$\""
   ${EndIf}
 !endif
 
   ; These need special handling on uninstall since they may be overwritten by
   ; an install into a different location.
   StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}"
   ${WriteRegStr2} $TmpVal "$0" "" "$INSTDIR\${FileMainEXE}" 0
   ${WriteRegStr2} $TmpVal "$0" "Path" "$INSTDIR" 0
@@ -678,17 +678,17 @@ Function CheckExistingInstall
 FunctionEnd
 
 Function LaunchApp
   ClearErrors
   ${GetParameters} $0
   ${GetOptions} "$0" "/UAC:" $1
   ${If} ${Errors}
     ${ManualCloseAppPrompt} "${WindowClass}" "$(WARN_MANUALLY_CLOSE_APP_LAUNCH)"
-    Exec "$INSTDIR\${FileMainEXE}"
+    Exec "$\"$INSTDIR\${FileMainEXE}$\""
   ${Else}
     GetFunctionAddress $0 LaunchAppFromElevatedProcess
     UAC::ExecCodeSegment $0
   ${EndIf}
 FunctionEnd
 
 Function LaunchAppFromElevatedProcess
   ${ManualCloseAppPrompt} "${WindowClass}" "$(WARN_MANUALLY_CLOSE_APP_LAUNCH)"
@@ -696,17 +696,17 @@ Function LaunchAppFromElevatedProcess
   ; Find the installation directory when launching using GetFunctionAddress
   ; from an elevated installer since $INSTDIR will not be set in this installer
   ReadRegStr $0 HKLM "Software\Clients\Mail\${ClientsRegName}\DefaultIcon" ""
   ${GetPathFromString} "$0" $0
   ${GetParent} "$0" $1
   ; Set our current working directory to the application's install directory
   ; otherwise the 7-Zip temp directory will be in use and won't be deleted.
   SetOutPath "$1"
-  Exec "$0"
+  Exec "$\"$0$\""
 FunctionEnd
 
 ################################################################################
 # Language
 
 !insertmacro MOZ_MUI_LANGUAGE 'baseLocale'
 !verbose push
 !verbose 3
--- a/mail/installer/windows/nsis/shared.nsh
+++ b/mail/installer/windows/nsis/shared.nsh
@@ -112,17 +112,17 @@
     ; and we currently call the PostUpdate twice, once for the user and once
     ; for the SYSTEM account.  Also, this would stop the maintenance service
     ; and we need a return result back to the service when run that way.
     ${If} $5 == ""
       ; An install of maintenance service was never attempted.
       ; We call ExecShell (which is ShellExecute) with the verb "runas"
       ; to ask for elevation if the user isn't already elevated.  If the user 
       ; is already elevated it will just launch the program.
-      ExecShell "runas" "$INSTDIR\maintenanceservice_installer.exe"
+      ExecShell "runas" "$\"$INSTDIR\maintenanceservice_installer.exe$\""
     ${EndIf}
   ${EndIf}
 !endif
 
   ; Remove talkback if it is present (remove after bug 386760 is fixed)
   ${If} ${FileExists} "$INSTDIR\extensions\talkback@mozilla.org\"
     RmDir /r "$INSTDIR\extensions\talkback@mozilla.org\"
   ${EndIf}