title: How and where exactly does the default email client gets set in the registry?
body: <p>In order to find out what the default email client is, I found the same information over and over again: Look at the default string in <code>HKLM\Software\Clients\Mail</code>. (see for example this <a href="https://stackoverflow.com/questions/1119745/find-the-default-email-client">related question</a>) </p>
  
  <p>However, this seems not to be true for all OSs and/or situations:
  I have two machines running Win7 64bit, let's call them A and B. 
  A has Outlook 2010 64bit and Thunderbird 3 32bit installed.
  B has Outlook 2007 32bit and Thunderbird 3 32bit installed. 
  Both A and B have Thunderbird set as their default mail client.</p>
  
  <p>However, the state of the registry is not as I expected it:</p>
  
  <p>On machine A, both <code>HKLM\Software\Clients\Mail</code> and <code>HKLM\Software\Wow6432Node\Clients\Mail</code> have an empty string as the default string value.
  On B, both those keys contain <code>Microsoft Outlook</code> as the default string value, which is clearly wrong. 
  Further investigation revealed that the correct value seems to be written to <code>HKCU\Software\Clients\Mail</code> on both machines.</p>
  
  <p>I want my application to handle this correctly for all cases. It makes kinda sense, that Win7 now seems to hold a separate default mail client for each user, but it appears rather inconsistent. When looking at the plethora of information that points to <code>HKLM\Software\Clients\Mail</code>, it seems obvious that previous versions of Windows handled this differently and always wrote to that location. So when did this change? Has the wrong value on machine B any meaning? If not, why does it get written there in the first place? Does the mix of 64bit and 32bit email clients on the same computer change anything?</p>
  
  <p>I would most appreciate if anyone would share reliable information or documentation that explains this topic! Maybe there is a Win32 API function that returns the correct value?</p>