1

How can i register a C# console program to run with a protocol uri?

I want to call an run a console program with the tel:+0123456789 I've fount a lot of information how to do it for Windows 7 or how to register a Windows 8 App with an protocol uri. Can someone point me to a solution, how i can do that for an Console Application in Windows 8?

Thanks for any help.

mcd
  • 101
  • 1
  • 7

1 Answers1

-1

It's essentially the same for a Windows 8 or 8.1 desktop app as it is for Windows 7.

Register the URL in the registry:

HKEY_CLASSES_ROOT
   tel
      (Default) = "URL:Tel Protocol"
      URL Protocol = ""
      DefaultIcon
         (Default) = "mytelapp.exe,1"
      shell
         open
            command
               (Default) = "C:\Program Files\mytelapp\mytelapp.exe" "%1"

Since there are likely to be other apps who want to handle the tel protocol also add a pointer to your Capabilities registration under HKLM\SOFTWARE\RegisteredApplications

See Registering the Application Handling the Custom URI Scheme and Best practices for file type and protocol associations in Windows Developer Preview desktop apps and Default Programs

Rob Caplan - MSFT
  • 21,714
  • 3
  • 32
  • 54