2010-07-08 127 views
1

有人能告诉我在设置默认程序时如何填充程序列表? 我想添加和删除一些,但没有看到如何去做。由于设置默认程序

从开始菜单:控制面板\程序\默认程序\设置默认程序

+0

为了遏制票接近,你想这样做编程* *? – 2010-07-08 23:32:57

+0

我不知道人们为什么投票迁移到SU。据我所知,提问者希望将他们自己的程序添加到特定类别的用户选择列表中。这是一个与编程有关的问题。 – EMP 2010-07-08 23:33:07

+0

@Evgeny:这就是我的想法...... – 2010-07-08 23:38:01

回答

1

我假定你的意思,你已经写了一个程序,您希望它出现在名单上,使用户能够选择他/她希望你的程序成为默认的程序。 MSDN有一个pretty good overview of the topic,但基本的想法是,你只需要设置一些registry entries

下面的例子表明,被称为web浏览器的一个虚构的Contoso的浏览器的注册表项:

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