How do I add my application in the Default Programs list

余生颓废 提交于 2019-12-01 11:54:07

问题


I want to add my application in the Default Programs list and read articles and questions like these:
How do I add my application in the Default Programs list of Windows Vista/7?
http://msdn.microsoft.com/en-us/library/cc144154%28v=vs.85%29.aspx
and do all of theme but no chance.
I make registry keys like these:

HKEY_LOCAL_MACHINE
   SOFTWARE
      Classes
         TestApp.AssocFile.TA4
            (Default) = TA4 Format
            DefaultIcon
               (Default) = %ProgramFiles%\TestApp\TA4.ico
            shell
               open
                  command
                     (Default) = %ProgramFiles%\TestApp\TA4Opener.exe


HKEY_LOCAL_MACHINE
   SOFTWARE
      Test
         TestApp
            Capabilities
               ApplicationDescription = App Description 
               FileAssociations
                  .ta4 = TestApp.AssocFile.TA4


HKEY_LOCAL_MACHINE
   SOFTWARE
      RegisteredApplications
         TestApp = Software\Test\TestApp\Capabilities   

but when I open Control Panel Set Default programs I can't find my application.
What I missed?


回答1:


Add ApplicationName value under Capabilities, in addition to all values you already have.

HKEY_LOCAL_MACHINE
  SOFTWARE
    Test
      TestApp
        Capabilities
          ApplicationName = Your Application Name

If your application still does not show up in the Set Default Programs list, make sure executable file listed under shell\open\command ( in your example, %ProgramFiles%\TestApp\TA4Opener.exe) has Version resource and Version.CompanyName is not empty.



来源:https://stackoverflow.com/questions/27375774/how-do-i-add-my-application-in-the-default-programs-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!