Where Windows 10 stores default email app in its registry
I have set up Google Chrome as my default email application in my [Windows 10> Settings> System> Default apps] (screenshot). My keyboard has the shortcut Fn+F2 which opens default email application, this works well if for example I use built in “Mail” app or some other app specially designed for this sort of thing but I want to open Gmail in my Chrome browser, problem is when I press the shortcut combination on the keyboard it simply opens Chrome with its homepage.
I need to find out where in Windows registry email default app is stored so I can adjust the link to open with the page I want it to but I can’t find it, there is so many different locations. This is the link I want to use which should work: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -- "https://mail.google.com"
Please let me know where Windows 10 stores its 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.
- "ShellExecute" - its value is a filename to be executed
-
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.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, underHKCU\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-
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
I didn't test if Chrome update would not break this work-around
- 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.
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.
Adding a program to any protocol:
- Open the Registry Editor.
- Navigate to
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet
. - Find the program (e.g. your browser) you wish to use (you must have already opened it).
- Add
mailto
to theURLAssociations
. - Do not reboot or log off.
- Close/rReopen the Settings secondary Control Panel and the program will be listed.
- Edit your program's internal settings.
Details:
Windows 10 needs to know what protocols a program supports in order to list the program for the protocol. Thankfully it's fairly simple with a minor complication of having a hash (likely for tracking) involved. I am guessing that the hash is generated per install (just a guess) so you likely can't dump it in to your windows-10-fix-all-junk.reg
file that you run after yet another install of Windows 10.
Blood and bloody hashes!
Mat, I use Waterfox as my default browser because I can (actually) customize it. If you need to create all the registry settings but you don't know where to find the hash well go look for your program in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\
, for Waterfox it was:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Waterfox\TaskBarIDs
Register all the things!
With the hash replaced by stars here is a registry dump (more than needed):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************]
@="Waterfox Classic"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\Capabilities]
"ApplicationDescription"="Waterfox delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web."
"ApplicationIcon"="C:\\MEDIA\\INTERNET\\Waterfox\\56.0\\waterfox.exe,0"
"ApplicationName"="Waterfox"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\Capabilities\FileAssociations]
".htm"="WaterfoxHTML-****************"
".html"="WaterfoxHTML-****************"
".shtml"="WaterfoxHTML-****************"
".xht"="WaterfoxHTML-****************"
".xhtml"="WaterfoxHTML-****************"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\Capabilities\StartMenu]
"StartMenuInternet"="Waterfox-****************"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\Capabilities\URLAssociations]
"ftp"="WaterfoxURL-****************"
"http"="WaterfoxURL-****************"
"https"="WaterfoxURL-****************"
"mailto"="WaterfoxURL-****************"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\DefaultIcon]
@="C:\\MEDIA\\INTERNET\\Waterfox\\56.0\\waterfox.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\InstallInfo]
"HideIconsCommand"="\"C:\\MEDIA\\INTERNET\\Waterfox\\56.0\\uninstall\\helper.exe\" /HideShortcuts"
"ShowIconsCommand"="\"C:\\MEDIA\\INTERNET\\Waterfox\\56.0\\uninstall\\helper.exe\" /ShowShortcuts"
"ReinstallCommand"="\"C:\\MEDIA\\INTERNET\\Waterfox\\56.0\\uninstall\\helper.exe\" /SetAsDefaultAppGlobal"
"IconsVisible"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\shell\open\command]
@="\"C:\\MEDIA\\INTERNET\\Waterfox\\56.0\\waterfox.exe\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\shell\properties]
@="Waterfox &Options"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\shell\properties\command]
@="\"C:\\MEDIA\\INTERNET\\Waterfox\\56.0\\waterfox.exe\" -preferences"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\shell\safemode]
@="Waterfox &Safe Mode"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Waterfox-****************\shell\safemode\command]
@="\"C:\\MEDIA\\INTERNET\\Waterfox\\56.0\\waterfox.exe\" -safe-mode"