0

I am writing a program that can handle mailto: protocol. In order to allow user to select my program as a default email handler, I registered my program. However, I noticed that some, programs display clickable link to company web site under company name, for example File Explorer.

How do I specify a link to my web site so that Default Programs UI shows it when my app is selected?

I use Microsoft Visual Studio 2013 ultimate. Here's my program registration details in .reg format:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"MyMail"="SOFTWARE\\MyFirm\\MyApp\\Capabilities"

[HKEY_LOCAL_MACHINE\SOFTWARE\MyFirm\MyApp\Capabilities]
"ApplicationDescription"="This is an awesome description."
"ApplicationName"="Awesome App"

[HKEY_LOCAL_MACHINE\SOFTWARE\MyFirm\MyApp\Capabilities\URLAssociations]
"mailto"="mailto.2"

[HKEY_CLASSES_ROOT\mailto.2]
@="URL:MailTo Protocol"
"EditFlags"=dword:00000002
"FriendlyTypeName"="My Mail Client"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\mailto.2\shell\open\command]
@="\"C:\\bg\\awesome.exe\" \"%l\""

Here is an example of clickable link for File Explorer. File Explorer

Here is my application that does not have a link My App - no link

This is what I found out so far:

  1. Not all apps display this link.

  2. Both Microsoft and non-Microsoft apps can display this link, for example, CyberLink PowerDVD displays link to www.cyberlink.com.

  3. Not all Microsoft apps display the link, and those that do display it, may have different URLs. For example, three apps by Microsoft Corporation: Paint - no link, Photo Gallery - http://www.microsoft.com, Visual Studio 2013 - http://microsoft.com (no www).

  4. Skype for Desktop shows company Skype Technologies S.A. and a link to http://www.microsoft.com.

  5. It does not appear that the link address is stored in the Registry. It is stored in the executable listed under shell\open\command.

  6. It does not appear to be stored as a resource in the executable.

  7. The strings tool from sysinternals does not find the link address in the executable.

1 Answer 1

0

The URL displayed under the program and company name in Default Programs is stored in the digital signature as authenticated attribute 1.3.6.1.4.1.311.2.1.12.

One way to set this value is using signtool from Visual Studio Command Prompt. The URL is the value after /du parameter, for example:

signtool sign /s My /n "RegmagiK Software" /du "http://www.RegmagiK.com" awesome.exe 

The certificate must be signed by a trusted certificate authority.

For testing, one can create a self-signed certificate using makecert tool and make it trusted using certificate manager.

makecert -r -ss My -sr CurrentUser -n "CN=RegmagiK Software" SelfSigned.cer
certmgr.exe /add SelfSigned.cer /s /r currentUser root

After signing executable, reopen Default Programs and click on your application. It should now display the link to your site. Properly signed executable has the link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.