- 1 year ago
How to register custom protocol for Windows 10?
Comment
1 / 1
To register a custom protocol in Windows 10, you can follow these steps:
Open the Registry Editor.
- Press the Windows key + R on your keyboard to open the Run dialog.
- Type "regedit" and press Enter to open the Registry Editor.
Navigate to the following registry key:
HKEY_CLASSES_ROOT
Right-click on the
HKEY_CLASSES_ROOT
key and select "New" -> "Key".- Give the new key a name, which will be your custom protocol.
- For example, if your custom protocol is "myprotocol", name the key "myprotocol".
Right-click on the newly created key and select "New" -> "String Value".
- Name the string value "URL Protocol".
(Optional) Set the default icon for your custom protocol.
- Right-click on the key and select "New" -> "String Value".
- Name the string value "DefaultIcon".
- Set the value to the path of the icon file you want to use.
Create a new key under your custom protocol key.
- Right-click on the key and select "New" -> "Key".
- Name the key "shell".
Create a new key under the "shell" key.
- Right-click on the "shell" key and select "New" -> "Key".
- Name the key "open".
Create a new key under the "open" key.
- Right-click on the "open" key and select "New" -> "Command".
- Name the key "command".
Set the default value of the "command" key.
- Double-click on the "(Default)" value under the "command" key.
- Set the value to the path of the executable or script that should handle your custom protocol.
For example:"C:\path\to\your\executable.exe" "%1"
Close the Registry Editor.
After following these steps, your custom protocol will be registered in Windows 10. When a URL with your custom protocol is clicked, it will be handled by the specified executable or script.