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

This commit is contained in:
cbiesinger%web.de 2003-06-22 16:20:32 +00:00
Родитель bdd9896fe3
Коммит 2edb25ce92
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -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();