Where Windows 10 stores default email app in its registry

  • Where Windows 10 stores default email app in its registry?

    This is the caption of the original question.
    Default email app in Windows 10 is an App which handles mailto: protocol. It's actually not supposed to open Inbox, but Write a New Email form - by opening a new page/window to start writing an email.

  • How to change Hardware Keys association?

    This is the rest of the question, or question number two.
    One of the buttons on your keyboard was defined as Write New Email, which was done by calling the Default Email App using mailto: protocol.

But calling mailto: protocol wasn't opening the Write New Email form, neither the Inbox, or an Email App. And that's a question number three.

  • Why is Chrome not opening Write new e-mail form using mailto protocol?

    Because Chrome will ignore it, unless it's explicitly allowed in Chrome's Options.

All three answers in detail:

  • Hardware keys association

    What action should be taken upon pressing of a special HW key
    HW button could be a dedicated button, or a Fn+F2 combination as in Asker's case.
    Registry settings are under:
    HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Appkey
    Key 15 represents settings for Email button
    Value names could be:

    • "ShellExecute" - its value is a filename to be executed
      e.g. "calc.exe" or chrome.exe with corrent path and possible arguments
    • "Association" - points to a shell association object
      which is a name of a Key under HKEY_CLASSES_ROOT
      e.g. txtfile would open Notepad, or as in our case mailto would open an App associated with mailto protocol.

    To open a Write new e-mail using mailto association. This was the default behavior on the Asker's computer:

    REGEDIT4
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Appkey\15]
    "Association"="mailto"
    

    To open an e-mail app, or browser with an e-mail's Inbox, you can use shell execute with proper command. This is what Asker desired and his solution would work for this case.

    ShellExecute "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -- "https://mail.google.com"

    or in a form of a .reg file

    REGEDIT4
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\15]
    "ShellExecute"="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" -- \"https://mail.google.com\""
    

    To open Gmail App - Chrome's App in it's dedicated window.

    REGEDIT4
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\15]
    "ShellExecute"="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --app-id=pjkljhegncpnkpknbcohdijeoejaedia"
    

    for this last one to work, you also need to have the Gmail App installed in Chrome, and need to enabled "Open As Window" in right-click menu on the Gmail App in Chrome.


  • Default e-mail App for mailto protocol

    Which program is handling the Write New Email call
    for example when you click on send e-mail to developer on some Program's About menu or on various other places in Windows or by clicking an email link in a document or a web page.
    The selection can only be done using the Choose an app dialog from Windows Settings or Open as command.

    Settings - Default Apps

    Would be less confusing if the settings was saying Write an Email and not just Email
    I don't think that there is a separate setting in the Windows interface for an App which would open Inbox.

    Registry entries for mailto protocol are under HKLM\SOFTWARE\Classes\mailto and as it is with other Classes, they could be overridden by entries for CURRENT_USER, under HKCU\SOFTWARE\Classes\mailto
    BUT
    There were changes in recent Windows versions and now, there are more places in registry which will further override shell associations from Classes. Moreover, in case of mailto they are mandatory and so rendering the Classes values for mailto useless.
    Next in line of importance is Key:
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\mailto]
    which in turn is overridden by:
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\UrlAssociations\mailto]
    which is also used only if it's not overridden by:
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\mailto]
    GOOD JOB Microsoft :)
    Values under these Keys have the same format, a Key UserChoice with a ProgId valuename pointing to shell association Key from Classes.
    But you can all but forget about editing these values, as there also is the Hash value. It's a protection against such registry edits.
    User MUST click himself at least once to select an App on a standard Windows Open With dialog popup, if he also check the Always option, the Hash value is generated and the choice is remembered and written to last two Keys from the list above. Another option is to use the Settings as shown in the picture above.
    It's a safeguard against malicious Apps, viruses and bad programmed Apps.

    To troubleshoot a problem with default mailto association, you can delete mailto Keys from under all of these locations, except LOCAL_MACHINE.
    Windows will re-create them on next use of the mailto protocol.


  • Chrome browser handling of mailto: links

    If Chrome is selected as the Default Email App, the registry settings as mentioned above will point to ChromeHTML association. Calling mailto protocol will then perform an action from this registry key.
    HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command default "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -- "%1"
    %1 is substituted by something like this: mailto:[email protected]?subject=Hello This string will be passed to the Chrome browser's address bar.
    Chrome is expected to react to the mailto: protocol by an appropriate action defined inside Chrome. But the trouble is:

    There is no default action for mailto: links inside Chrome defined.

    • The default way to turn this on should be to "Click on the eye in the address bar." while on gmail.com web page and selecting Use Gmail.
      But sometimes, there is no "eye"
    • Turn mailto: handler on manually.
      Go to Chrome Settings - Privacy - Content Settings - Handlers - Manage Handlers,
      or enter address: chrome://settings/handlers
      then remove Ignored protocol handlers and switch Active protocol handlers to mail.google.com

      Protocol handlers

    • There is another work-around I found. By opening this link, a Write new e-mail form will open https://mail.google.com/mail?extsrc=mailto&[email protected]
      But when I used it as command in ChromeHTML Class, it broke the functionality of opening http links in browser, so I created a new Class ChromeMAILTO and changed associations for capability definitions of Chrome Browser. This is the complete .reg file for this work-around:

      REGEDIT4
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeMAILTO\Application]
      "ApplicationName"="Google Chrome mailto"
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeMAILTO\shell\open\command]
      @="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" -- https://mail.google.com/mail?extsrc=mailto&url=%1"
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\Capabilities\URLAssociations]
      "mailto"="ChromeMAILTO"
      

      or, if you prefer to have it open as an Chrome App, in dedicated window:

      REGEDIT4
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeMAILTO\Application]
      "ApplicationName"="Google Chrome mailto"
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeMAILTO\shell\open\command]
      @="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --app=\"https://mail.google.com/mail?extsrc=mailto&url=%1\""
      
      [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\Capabilities\URLAssociations]
      "mailto"="ChromeMAILTO"
      

      Now select Google Chrome mailto as the Default Email app enter image description here

    I didn't test if Chrome update would not break this work-around


Ok I've found the answer here if anyone is interested. [enter link description here][1] and it works perfectly

Below is a quote from that link

Here is the reg tweak...for the side one-touch keys (that is what they are called)

Internet Key: HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Appkey\7 "Association"="http" ; Change the string value "http"

Calculator Key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\18 "ShellExecute"="calc.exe"; Change the string value "calc.exe"

Email Key: HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Appkey\15 "Association"="mailto" ; Change the string value "mailto"

Cyberlink PowerDVD/Mediasmart Key: HKLM\SYSTEM\ControlSet001\Control\MobilePc\HotStartButtons\2 "ApplicationPath" = "C:\Program File(x86)\Cyberlink\PowerDVD9\PowerDVD9.exe"; Change the string value "C:\Program File(x86)\Cyberlink\PowerDVD9\PowerDVD9.exe"

[1]: http://h30434.www3.hp.com/t5/Notebook-Hardware-and-Upgrade-Questions/How-do-I-customize-the-Action-Keys/td-p/379207%5CPowerDVD9%5CPowerDVD9.exe%22

But for little more explaining this is what I did:

Run [regedit] and go to [HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Appkey\15], create new [string value] with the name of [ShellExecute] and give it value of ["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -- "https://mail.google.com"]. [Appkey\7] is for internet shortcut key and [AppKey\18] is for calculator shortcut key. Besides [ShellExecute] which executes program you can also do [Association] with example value of [http] or [mailto], there are possibly more actions that can be done.