title: Setting mailto: protocol handler programmatically in Windows 8
body: <p>Before Windows 8, the method of adding a <code>mailto:</code> protocol handler was straightforward (as outlined here <a href="https://stackoverflow.com/questions/231/register-windows-program-with-the-mailto-protocol-programmatically">Register Windows program with the mailto protocol programmatically</a>)</p>
  
  <p>As of Windows 8, the old method no longer works. It would seem that Win8 enforces the following key: <code>HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\URLAssociations\‌​MAILTO\UserChoice</code>.</p>
  
  <p>It also appears the <code>ProgID</code> of the selected app is hashed and can't be forged, at least not that I can tell. </p>
  
  <p>Does anyone have a working method for this, or can point me at a utility class/code that'll outline how to accomplish this programmatically? </p>
  
  <p>For code, any language will do.</p>
  
  <p><strong>Edit</strong> </p>
  
  <p>I've been asked from other discussions to specify a use-case, so I think it'd be helpful in the context of this question. Please consider this screenshot <a href="https://github.com/shellscape/Gmail-Notifier-Plus/raw/master/Promotional/prefs-account.png" rel="nofollow noreferrer">https://github.com/shellscape/Gmail-Notifier-Plus/raw/master/Promotional/prefs-account.png</a> and the checkbox allowing the user to specify mailto handling. In this use-case, no one is forcing the user, the user is in control and makes the decision. While windows 8 store apps (metro/modern) have an available app manifest entry that automates the missing process described above, nothing seems to readily exist for desktop apps.</p>