209985 patch by bugzilla@pippo.demon.co.uk r=cavin sr=dmose MAPI does not check HKEY_CURRENT_USER for default mail client

git-svn-id: svn://10.0.0.236/trunk@144041 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de
2003-06-22 16:20:32 +00:00
parent 9b45a956e6
commit c76137a92c

View File

@@ -230,8 +230,14 @@ PRBool nsMapiRegistryUtils::IsDefaultMailClient()
{
if (!isSmartDll() && !isMozDll())
return PR_FALSE;
//first try to get the users default mail client
nsCAutoString name;
GetRegistryKey(HKEY_LOCAL_MACHINE, "Software\\Clients\\Mail", "", name);
GetRegistryKey(HKEY_CURRENT_USER, "Software\\Clients\\Mail", "", name);
//if that fails then get the machine's default client
if(name.IsEmpty()){
GetRegistryKey(HKEY_LOCAL_MACHINE, "Software\\Clients\\Mail", "", name);
}
if (!name.IsEmpty()) {
nsCAutoString keyName("Software\\Clients\\Mail\\");
keyName += name.get();