代码之家  ›  专栏  ›  技术社区  ›  ChiliYago

设置默认程序

  •  1
  • ChiliYago  · 技术社区  · 14 年前

    有人能告诉我在设置默认程序时如何填充程序列表吗? 我想添加和删除一些,但不知道如何执行。谢谢

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

    1 回复  |  直到 14 年前
        1
  •  1
  •   Dean Harding    14 年前

    我假设您的意思是您已经编写了一个程序,并且希望它出现在该列表中,这样用户就可以选择他/她希望您的程序作为默认程序的内容。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