# 通过编程注册Windows程序与mailto协议

Edit: Removed reference to Delphi, because the answer is independent of your language.

0

## 3 答案

System Key: `[HKEY_CLASSES_ROOT\mailto\shell\open\command]`

Value Name: `(Default)`

0

http://support.microsoft.com/kb/299853

0

@Dillie-O: Your answer put me in the right direction (I should have expected it to just be a registry change) and I got this working. But I'm going to mark this as the answer because I'm going to put some additional information that I found while working on this.

• 要在计算机上将程序与所有用户的mailto协议相关联，请将HKEY_CLASSES_ROOT \ mailto \ shell \ open \命令更改为默认值：
您的程序的可执行文件”“％1”
• 将程序与当前用户的mailto协议关联，更改HKEY_CURRENT_USER \ Software \ Classes \ mailto \ shell \ open \命令默认值为：
您的程序的可执行文件”“％1”

％1将被整个mailto URL替换。例如，给定链接：

``````Email me
``````

0