1

I would like to register my program to handle the MAILTO protocol

i have seen these answers

i tried adding a new key or modifying the existing key at this path HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\URLAssociations\MAILTO\Userchoice

additionally, i added my program to to the HKCR root, but that did not make my program appear in the select list

also, for testing purposes, i tried replacing the classname value of the mailto key at this path HKEY_CURRENT_USER\SOFTWARE\Clients\StartMenuInternet\GoogleChrome\Capabilities\ URLAssociations to the classname of my program. this actually worked. but instead of hacking into google chrome, id rather add my own registry key

how can i add my program as a legit handler for mailto

TIA

Community
  • 1
  • 1

1 Answers1

0

You will need to add to several places in the registry. Here is what I use to register my program. If your program is 32-bit and your Windows is 64-bit you need to add the the section Wow6432Node as well (as in my example, my program is 32-bit):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\mailto]
@="URL:MailTo Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\mailto\shell\open\command]
@="\"C:\\Program Files (x86)\\MQTechnologies\\RemoteExecuter\\RemoteExecuter.exe\" %1"

[HKEY_CLASSES_ROOT\RemoteExecuter.Mailto]
@="URL:MailTo Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\RemoteExecuter.Mailto\shell\open\command]
@="\"C:\\Program Files (x86)\\MQTechnologies\\RemoteExecuter\\RemoteExecuter.exe\" %1"


[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mailto]
@="URL:MailTo Protocol"
"URL Protocol"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mailto\shell\open\command]
@="\"C:\\Program Files (x86)\\MQTechnologies\\RemoteExecuter\\RemoteExecuter.exe\" %1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\RemoteExecuter.Mailto]
@="URL:MailTo Protocol"
"URL Protocol"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\RemoteExecuter.Mailto\shell\open\command]
@="\"C:\\Program Files (x86)\\MQTechnologies\\RemoteExecuter\\RemoteExecuter.exe\" %1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MQTechnologies\RemoteExecuter\Capabilities\UrlAssociations]
"mailto"="RemoteExecuter.Mailto"

[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"RemoteExecuter"="SOFTWARE\\Wow6432Node\\MQTechnologies\\RemoteExecuter\\Capabilities"

Thomas Tran