Open Bug 209985 Opened 21 years ago Updated 2 years ago

MAPI does not check HKEY_CURRENT_USER for default mail client

Categories

(MailNews Core :: Simple MAPI, defect)

x86
Windows XP
defect

Tracking

(Not tracked)

People

(Reporter: mozilla, Unassigned)

References

Details

Attachments

(1 file)

If multiple users on the machine have a different preference for their mail
client (both Mozilla based) then when one sets their default mail client, the
next time the other user uses the machine they get prompted to set it back to
their default. etc etc. This is because although Mozilla sets HKEY_CURRENT_USER
key for the mail client it does not check it when looking to see if it is the
default.

Patch coming...
Attachment #126045 - Flags: review?(cavin)
Comment on attachment 126045 [details] [diff] [review]
Patch that checks HKEY_CURRENT_USER
[Checkin: Comment 6]

r=cavin.
Attachment #126045 - Flags: review?(cavin) → review+
Attachment #126045 - Flags: superreview?(dmose)
Comment on attachment 126045 [details] [diff] [review]
Patch that checks HKEY_CURRENT_USER
[Checkin: Comment 6]

sr=dmose@mozilla.org
Attachment #126045 - Flags: superreview?(dmose) → superreview+
Can someone check this in for me, I don't have CVS access
I got the reviews for your patch and i will find someone for the checkin...
(asked Stephend but he were busy with his Tivo :-) )
checked in.
Checking in nsMapiRegistryUtils.cpp;
/cvsroot/mozilla/mailnews/mapi/mapihook/src/nsMapiRegistryUtils.cpp,v  <-- 
nsMapiRegistryUtils.cpp
new revision: 1.13; previous revision: 1.12
done
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
thanks
I like this fix conceptually, but I do not believe that Windows supports the 
HKEY_CURRENT_USER\Software\Clients branch; everything I have read on the issue, 
and my own testing, indicates that the 'default client' (mail or otherwise) is a 
global preference, in HKEY_LOCAL_MACHINE.

Since the primary use of MAPI from a Mozilla perspective is to allow other 
programs to invoke Mozilla, and those other programs won't check 
HKEY_CURRENT_USER, this fix is of limited use.  It does, however, address 
Mozilla's own prompting to set itself as default.
Windows XP uses it to set the start menu mail client:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;297878

But you are right this breaks MAPI which I hadn't tested. Right clicking on an
item in explorer and selecting send to 'mail recipient' doesn't work as expected
with this patch. From what I can tell it is just not possible to set a default
mail client on a per-user basis. I suggest the patch gets backed out.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Does anybody think this could be at all related to bug 207974.

The problem may be that that it doesn't even know how to set the default mail
client properly (which it doesn't), so setting it back wouldn't work either.

Perhaps the problem is deeper than bug 207974 indicates. Perhaps this shouldn't
be in local_machine at all, but in current_user.
Blocks: 207974
According to http://support.microsoft.com/default.aspx?scid=kb;en-us;315240 ,
Windows XP does not support a different default email program for each user. 
However, in my testing, if you put the entries in HKEY_CURRENT_USER, they will
get used by Windows.  Try merging the info below in the registry.  Customize it
according to your needs.  Note that if the default e-mail setting is changed,
these keys may be deleted.  In that case, simply merge the file again.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\mailto]
@="URL:MailTo Protocol"
"EditFlags"=dword:00000002
"URL Protocol"=""
"BrowserFlags"=dword:00000008

[HKEY_CURRENT_USER\Software\Classes\mailto\DefaultIcon]
@="%ProgramFiles%\\mozilla.org\\Mozilla\\chrome\\icons\\default\\messengerWindow.ico,0"

[HKEY_CURRENT_USER\Software\Classes\mailto\shell]
@=""

[HKEY_CURRENT_USER\SOFTWARE\Classes\mailto\shell\open]

[HKEY_CURRENT_USER\SOFTWARE\Classes\mailto\shell\open\command]
@="\"C:\\Program Files\\mozilla.org\\Mozilla\\mozilla.exe\" -mail %1"

[HKEY_CURRENT_USER\SOFTWARE\Classes\mailto\shell\open\ddeexec]

[HKEY_CURRENT_USER\SOFTWARE\Classes\mailto\shell\open\ddeexec\Application]
@="mozilla"

[HKEY_CURRENT_USER\SOFTWARE\Classes\mailto\shell\open\ddeexec\Topic]
@="System"

That is correct; the mailto twig of the Classes branch will be merged, on 
Win2000/WinXP; that's what bug 207974 is about.

However, the 'default client' setting -- which this bug is about -- is NOT 
referred to on a per-user basis.  This is primarily only an issue under WinXP, 
which (I gather) has Start menu items like 'start internet' and 'e-mail' which 
invoke the selected 'default client', and for setting the default MAPI client.  
That is confirmed by the MSKB article pointed to by comment 11, which admits it 
is a bug; presumably, then, the MSKB article pointed to by comment 9 describes 
the intended design, and maybe it will even be working that way by XP SP2.
Product: MailNews → Core
Assignee: cavin → nobody
Status: REOPENED → NEW
QA Contact: stephend → simple-mapi
Attachment #126045 - Attachment description: Patch that checks HKEY_CURRENT_USER → Patch that checks HKEY_CURRENT_USER [Checkin: Comment 6]
Product: Core → MailNews Core
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: