How can I get the description of a file extension in .NET

前端 未结 5 2039
囚心锁ツ
囚心锁ツ 2020-12-11 05:52

HI,

Windows provides descriptions for file extension such as \"Control Panel Item\" for .cpl files and \"PowerISO File\" for .daa files. Is there any way I can obtai

5条回答
  •  盖世英雄少女心
    2020-12-11 06:25

    Lets say your extension is .xyz To show most user friendly text like "Control Panel Item" you should do two things:

    1. Go to HKEY_CLASSES_ROOT and search for node xyzfile. Check for "cplfile"
    2. If it is not there you can get the association in the same place but node is .xyz . It will tell what app opens it so you can get the name.

提交回复
热议问题