我假设您的意思是您已经编写了一个程序,并且希望它出现在该列表中,这样用户就可以选择他/她希望您的程序作为默认程序的内容。MSDN有
pretty good overview of the topic
但基本的想法是你只需要设置一些
registry entries
.
以下示例显示虚拟的Contoso浏览器(称为WebBrowser)的注册表项:
HKEY_LOCAL_MACHINE
SOFTWARE
Contoso
WebBrowser
Capabilities
ApplicationDescription = This award-winning Contoso browser is better than ever. Search the Internet and find exactly what you want in just seconds. Use integrated tabs and new phishing detectors to enhance your Internet experience.
FileAssociations
.htm = ContosoHTML
.html = ContosoHTML
.shtml = ContosoHTML
.xht = ContosoHTML
.xhtml = ContosoHTML
Startmenu
StartmenuInternet = Contoso.exe
UrlAssociations
http = Contoso.Url.Http
https = Contoso.Url.Https
ftp = Contoso.Url.ftp
SOFTWARE
RegisteredApplications
Contoso.WebBrowser.1.06 = SOFTWARE\Contoso\WebBrowser\Capabilities