Windows Custom Protocol Registry Registration (Using URI Scheme)

HEUNG KIM 20 Reputation points
2024-07-22T03:45:46.3733333+00:00

I'm using a custom protocol, but sometimes, even though the program is installed, I get a message saying that the protocol cannot be found and prompting me to find an app in the MS Store.

This occurs when trying to execute a specific program from a Chrome web service.

The format used in Chrome is something like myProgram://parameter.

Sure, here is the translated version of your query:

I asked GPT about my issue and received the following guidance for registering a custom protocol:

HKEY_CLASSES_ROOT
└── myProgram
	├── (Default) = "URL:myProgram Protocol"
	├── URL Protocol = ""
	└── shell
	    └── open
	        └── command
	            └── (Default) = "C:\Path\To\Your\myProgram.exe" "%1"

Default programs like callto, mailto, and calculator all have their default values set, but I know that to register a custom protocol, you need the [URL Protocol = "" ] value.

Why do we also need to set the (Default) value to "URL Protocol"? Is it possible that the program sometimes cannot be found if this value is not set?

If so, could you provide evidence?

Windows development | Windows API - Win32
{count} votes

Accepted answer
  1. Xiaopo Yang - MSFT 12,731 Reputation points Microsoft External Staff
    2024-07-22T06:48:02.5033333+00:00

    Hello @HEUNG KIM,

    According to Registering an Application to a URI Scheme,

    Under this new key, the URL Protocol string value indicates that this key declares a custom pluggable protocol handler. Without this key, the handler application will not launch. The value should be an empty string.

    Also see https://stackoverflow.com/questions/3964152/how-do-i-create-a-custom-protocol-and-map-it-to-an-application.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.