Closed Bug 493060 Opened 16 years ago Closed 16 years ago

Installer default mail client option doesn't set it correctly on Windows XP

Categories

(Thunderbird :: Installer, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b4

People

(Reporter: rain1, Assigned: mcsmurf)

Details

(Whiteboard: [no l10n impact])

Attachments

(2 files, 4 obsolete files)

Specifically - the start menu still shows OE - MAPI goes to OE What seems to be happening is that SetAsDefaultAppUser is what sets the mail/news client values, and we don't call it during install. We call SetAsDefaultMailAppUser instead. What's even more annoying is that Thunderbird doesn't even check for this value as part of its default app check, so the only way to fix this is to set another app as the default and then run the Tb default app check again. Argh. I'll ask for review once the try server build is complete.
Assignee: nobody → sid.bugzilla
Status: NEW → ASSIGNED
Just so you know... the reason that value isn't checked, etc. is that for the most part OS integration works for the unprivileged user install case which is something that Firefox wants. Mail clients have an additional dependency on being able to write to HKLM for MAPI integration so it may make sense to require that the user has the ability to write to HKLM. It is really a PITA to try to support both unprivileged user installs side by side with privileged user installs.
(In reply to comment #1) > Just so you know... the reason that value isn't checked, etc. is that for the > most part OS integration works for the unprivileged user install case which is > something that Firefox wants. Mail clients have an additional dependency on > being able to write to HKLM for MAPI integration so it may make sense to > require that the user has the ability to write to HKLM. It is really a PITA to > try to support both unprivileged user installs side by side with privileged > user installs. Hm, I see. In that case, should we not set HKCU\Software\Clients\Mail to Mozilla Thunderbird if we don't have the corresponding key in HKLM?
I don't think it should when the keys aren't for the current installation. I'm working on adding this for Firefox over in bug 404541 and will likely add it for other apps as well in that bug.
Flags: blocking-thunderbird3?
Keywords: relnote
Sid, Robert, what's the status of this bug? As it stands, it sounds like getting some resolution blocks TB3
Flags: blocking-thunderbird3? → blocking-thunderbird3+
Whiteboard: [no l10n impact]
Target Milestone: --- → Thunderbird 3.0b4
(In reply to comment #4) > Sid, Robert, what's the status of this bug? As it stands, it sounds like > getting some resolution blocks TB3 We basically need to port bug 404541 to Thunderbird. IIRC rs said that his hands were full with Fennec right now, so he might not be able to get to it. Does this block b4?
Assignee: sid.bugzilla → nobody
Status: ASSIGNED → NEW
Comment on attachment 377502 [details] [diff] [review] patch to move writing the Clients\Mail string to a better location this patch is wrong
Attachment #377502 - Attachment is obsolete: true
mcsmurf, would you be interested in taking a stab at this?
Wolfgang would you be interested in fixing this one ?
Attached patch Patch (obsolete) — Splinter Review
This patch has not been tested yet, but it should work that way...
note: Thunderbird uses Software\clients\mail and Software\clients\News which don't use the FileMainEXE in the name unlike StartMenuInternet. It uses "Software\Clients\Mail\${ClientsRegName}" etc.
Attached patch Patch 2 (obsolete) — Splinter Review
Fixed the ClientsRegName issue, fixed on bogus return statement.
Attachment #399567 - Attachment is obsolete: true
Who can drive this in today?
Assignee: nobody → bugzilla
The section: ; Cleanup operations to perform at the end of the installation. @@ -427,7 +456,16 @@ ${MUI_INSTALLOPTIONS_READ} $0 "options.ini" "Field 6" "State" ${If} "$0" == "1" ${LogHeader} "Setting as the default mail application" - Call SetAsDefaultMailAppUser + ClearErrors + ${GetParameters} $0 + ${GetOptions} "$0" "/UAC:" $0 + ${If} ${Errors} + Call SetAsDefaultAppUserHKCU + ${Else} + GetFunctionAddress $0 SetAsDefaultAppUserHKCU + UAC::ExecCodeSegment $0 + ${EndIf} + ${EndIf} ${EndIf} ${EndUnless} looks like it adds an ${EndIf} too many, which would match the error log.
Attached patch Patch 3 (obsolete) — Splinter Review
Robert: Do you still review TB installer patches? Fixed the installer.nsi error
Attachment #399580 - Attachment is obsolete: true
Attachment #400068 - Flags: review?(robert.bugzilla)
I'll review the patch but I've never been a Thunderbird peer so you'll need to get a peer to also r+ it.
Whiteboard: [no l10n impact] → [no l10n impact][need rs review, r+ from peer]
Comment on attachment 400068 [details] [diff] [review] Patch 3 No need to resubmit yet since I'll shortly review the other two files >diff --git a/mail/installer/windows/nsis/installer.nsi b/mail/installer/windows/nsis/installer.nsi >--- a/mail/installer/windows/nsis/installer.nsi >+++ b/mail/installer/windows/nsis/installer.nsi >... >@@ -404,17 +418,31 @@ > ${LogMsg} "Added Shortcut: $SMPROGRAMS\$StartMenuDir\${BrandFullName} ($(SAFE_MODE)).lnk" > ${EndIf} > >- ${If} $AddQuickLaunchSC == 1 >- CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 >- ${LogMsg} "Added Shortcut: $QUICKLAUNCH\${BrandFullName}.lnk" >- ${EndIf} >+ !insertmacro MUI_STARTMENU_WRITE_END > > ${If} $AddDesktopSC == 1 > CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 > ${LogMsg} "Added Shortcut: $DESKTOP\${BrandFullName}.lnk" > ${EndIf} >- >- !insertmacro MUI_STARTMENU_WRITE_END >+ nit: remove spaces on the empty line >@@ -427,8 +455,16 @@ > ${MUI_INSTALLOPTIONS_READ} $0 "options.ini" "Field 6" "State" > ${If} "$0" == "1" > ${LogHeader} "Setting as the default mail application" >- Call SetAsDefaultMailAppUser >- ${EndIf} >+ ClearErrors >+ ${GetParameters} $0 >+ ${GetOptions} "$0" "/UAC:" $0 >+ ${If} ${Errors} >+ Call SetAsDefaultMailAppUserHKCU >+ ${Else} >+ GetFunctionAddress $0 SetAsDefaultMailAppUserHKCU >+ UAC::ExecCodeSegment $0 >+ ${EndIf} >+ ${EndIf} nit: fix indenting > ${EndUnless} > > ${LogHeader} "Updating Uninstall Log With Previous Uninstall Log" >@@ -438,9 +474,9 @@ > > ${InstallEndCleanupCommon} > >- ; If we have to reboot give SHChangeNotify time to finish the refreshing >- ; the icons so the OS doesn't display the icons from helper.exe > ${If} ${RebootFlag} >+ ; If we have to reboot give SHChangeNotify time to finish the refreshing >+ ; the icons so the OS doesn't display the icons from helper.exe nit: please fix the comment s/the refreshing/refreshing/ Also, below this line is ${If} ${FileExists} "$INSTDIR\${FileMainEXE}" ClearErrors Rename "$INSTDIR\${FileMainEXE}" "$INSTDIR\${FileMainEXE}.moz-delete" ${Unless} ${Errors} Delete /REBOOTOK "$INSTDIR\${FileMainEXE}.moz-delete" ${EndUnless} ${EndUnless} Please change the ${EndUnless} with ${EndIf} >@@ -584,22 +624,38 @@ >... >+ ; If the user doesn't have write access to the installation directory set >+ ; the installation directory to a subdirectory of the All Users application >+ ; directory and if the user can't write to that location set the installation >+ ; directory to a subdirectory of the users local application directory >+ ; (e.g. non-roaming). >+ ${CanWriteToInstallDir} $R8 >+ ${If} "$R8" == "false" >+ SetShellVarContext all ; Set SHCTX to All Users >+ StrCpy $INSTDIR "$APPDATA\${BrandFullName}\" >+ ${If} ${FileExists} "$INSTDIR" >+ ; Always display the long path if the path already exists. >+ ${GetLongPath} "$INSTDIR" $INSTDIR >+ ${EndIf} >+ ${CanWriteToInstallDir} $R8 >+ ${If} "$R8" == "false" >+ StrCpy $INSTDIR "$LOCALAPPDATA\${BrandFullName}\" >+ ${EndIf} >+ nit: please remove the empty line
Comment on attachment 400068 [details] [diff] [review] Patch 3 >diff --git a/mail/installer/windows/nsis/shared.nsh b/mail/installer/windows/nsis/shared.nsh >--- a/mail/installer/windows/nsis/shared.nsh >+++ b/mail/installer/windows/nsis/shared.nsh >... >@@ -554,6 +484,7 @@ > !macroend > !define UpdateProtocolHandlers "!insertmacro UpdateProtocolHandlers" > >+; Removes various registry entries for reasons noted below (does not use SHCTX). > !macro RemoveDeprecatedKeys > StrCpy $0 "SOFTWARE\Classes" I suggest adding the following to RemoveDeprecatedKeys http://mxr.mozilla.org/mozilla1.9.1/source/browser/installer/windows/nsis/shared.nsh#475 ; Remove the app compatibility registry key StrCpy $0 "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" DeleteRegValue HKLM "$0" "$INSTDIR\${FileMainEXE}" DeleteRegValue HKCU "$0" "$INSTDIR\${FileMainEXE}" r=me - note that I usually compile / test when I review but I don't have time to do so today so I've only done a code review.
Attachment #400068 - Flags: review?(robert.bugzilla) → review+
Whiteboard: [no l10n impact][need rs review, r+ from peer] → [no l10n impact][need r+ from peer]
Attached patch Patch 4Splinter Review
Comments (thanks rs!) addressed (and a few more bits of trailing whitespace).
Attachment #400068 - Attachment is obsolete: true
Attachment #400226 - Flags: review?(philringnalda)
Comment on attachment 400226 [details] [diff] [review] Patch 4 I'm not entirely convinced that I know how to thoroughly test, but it certainly seems to work.
Attachment #400226 - Flags: review?(philringnalda) → review+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [no l10n impact][need r+ from peer] → [no l10n impact]
After setting up a limited user on Windows 7, the installer did correctly ask to elevate. After having denied this request, it correctly chose C:\ProgramData\Shredder as default install path. When I acknowledged the elevation request, it chose C:\Program Files\Shredder as default install path. After having installed TB without elevation, the helper app requests elevation when you want to set TB as default mail client. I found a (non-critical) bug while testing this, will attach patch for this.
Attached patch Fix bugSplinter Review
This patch fixes one issue in SetClientsMail/SetClientsNews. Those macros use AddHandlerValues, which uses SHCTX. We need to set the context to all so that this macro writes to HKLM. No other variables in SetClientsMail/SetClientsNews should be affected by this change as only $INSTDIR, ${ClientsRegName}, ${FileMainEXE}, ${AppRegNameMail} and ${AppRegNameNews} are used.
Attachment #400258 - Flags: review?(robert.bugzilla)
Attachment #400258 - Flags: review?(robert.bugzilla) → review+
Comment on attachment 400258 [details] [diff] [review] Fix bug Has this patch already been checked in?
Has sticking "just one more patch" on a closed bug *ever* actually worked out?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED
Keywords: checkin-needed
Normally this works when the patch author does not forget about his patch :) http://hg.mozilla.org/comm-central/rev/b1d0616ac1e4
Status: ASSIGNED → RESOLVED
Closed: 16 years ago16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: